I have found out through the compiler that you cannot declare and initialize an array within a class header file. I was trying to figure out how I might go about getting a 5 by 14 array initialized as a private mamber within the class. I have included the header file and the class cpp file, neither are in full working form, but you should be able to get the idea about what i am trying to accomplish. thanks for taking a look.

Recommended Answers

All 2 Replies

you cannot declare and initialize an array in header file.but u can crate as many as u want object of any class member in your .c++ file so using this u can create run time array. think on this

All you have to do is move or more specifically code appropriately in Vend::Vend (default constructor) the values you want in fasm. This is how variables are initialized in a class, like int value [1][2] = {4, 8}; would be too code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.