View Full Version : beginner help
Jun 7, 2006, 12:32 AM
im new to C++, and need help. How do you initialize an array of say 50 elemnets (the first 25, give them the same value, then give the last 25 another value)
Jun 7, 2006, 12:59 AM
Don't know enough about C++ to help you out, but if it's anything like C:
Probably the best pointer and array tutorial I've ever seen. Is C++ your first language?
Jun 7, 2006, 01:21 AM
no Java is, have also done a bit of c but not enough, thanks for the tutorial looks good
Jun 7, 2006, 03:24 AM
int secondVal=667; // phew that was close
int* arIntegers=new int[max];
// use your array then when done with it
delete arIntegers; // i'm not quite sure, it's been a while since I last used manual memory management..