Is there an easier way of doing this where I can seclude the constint s(10); part and still accomplish the same result? The task is to create a program with the smallest amount of code inside 'main'
1 2 3 4 5 6 7 8 9 10
int main()
{
constint s(10);
int v[s], i;
for(i = 0; i < s; i++)
{
cin >> v[i];
}
}
Does it have to be an int* pointer, and why is that? If I want to put the func(void) in a class using mulitple files, should I use a *.h file to include or a *.cpp file included in a *.h file?
Or can I use just the *.h file for my class and put all my functions in it?