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

C++ Simple testing

Name: Anonymous 2009-01-20 10:48

Sup /prog/, where's the mistake?

class ArrayBox
{
public:

int numbers[9];
//functions
};

int main()
{
ArrayBox ab;
ab.numbers[] = {12, 23, 43, 4, 15, 61, 79, 18, 9, 5};
}


u2.cpp: In function "int main()":
u2.cpp:94: Error: expected primary-expression before "]" token
u2.cpp:94: Error: expected primary-expression before "{" token
u2.cpp:94: Error: expected ";" before "{" token


isn't that the right syntax to fill an array? I'm confused.

Name: Anonymous 2009-01-20 16:13

>>21
Didn't Bjarne design Sepples for himself? Lisp was designed for no one to use, and once they realized people wanted it, they never planned for people to use sexps. I'm pretty sure Alan Kay mostly wanted other people to use Smalltalk, since he wasn't the hugest of programmers himself.

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