Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Sepples

Name: Anonymous 2008-03-20 20:57

Hey /prog/, is there any way to pass an anonymous array into a function in Sepples?  For example, something like:

set_magic_numbers( { 2, 3, 5 } );

Name: Anonymous 2008-03-21 2:07

anonymous array? what?
im not sure what you mean, but this is how you pass a normal array

#include<iostream>
using namespace std;
void whateverFunction (int[]);

void main()
{
   int someArray[]={1,2,3,4,5};
   whateverFunction (someArray);
}

void whateverFunction (int someArray[])
{
   //do whatever the function does
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List