#include<iostream>
#include<cstdlib>
using namespace std;
void loadarray(float *);
void printarray(float *);
const int SIZE=12;
int main()
{
float data[SIZE];
loadarray(data);
printarray(data);
system("pause");
return 0;
}
{ //the error is occuring here
int i;
for(i=0; i<SIZE; i++)
{
cout<<"\n enter value "<<i+1<<": ";
cin>>*(inarray+i);
}
}
Im using dev c++ compiler, wtf am i doing wrong, its got an error popping up at the start of the function. any thoughts? help would be greatly appreciated
Name:
Anonymous2009-09-02 9:13
try moving that last block inside your main function
I'm still learning so chill the fuck out. Don't need ti be elitist on /prog/ man...
Name:
Anonymous2009-09-02 9:30
What is the name of this function causing errors?
Name:
Anonymous2009-09-02 9:37
>>6
Are you still learning to program, or just c++? In case of the former, you may want to consider switching languages. C++ isn't exactly a friendly language for a beginner.
It is well known that every single person on /prog/ learned to program simply by absorbing K&R through osmosis, and have never made a mistake or struggled with new concepts ever since.
>>20
It's true. We're naturals. I don't even read to learn new languages, anymore, I just put the compiler/interpreter in a flash drive and keep it next to my head when I sleep.