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

Pages: 1-

What am i doing wrong?

Name: Anonymous 2009-09-02 9:07

#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: Anonymous 2009-09-02 9:13

try moving that last block inside your main function

Name: Anonymous 2009-09-02 9:13

It's like my first "hello, world".

Name: Anonymous 2009-09-02 9:13

You're trying to program when you can't.

Name: Anonymous 2009-09-02 9:14

>>4
saging the top thread is a sure sign of a homo

Name: Anonymous 2009-09-02 9:21

I'm still learning so chill the fuck out. Don't need ti be elitist on /prog/ man...

Name: Anonymous 2009-09-02 9:30

What is the name of this function causing errors?

Name: Anonymous 2009-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.

Name: Anonymous 2009-09-02 9:38

Don't need ti be elitist on /prog/
ahahahahahahahahhahahahahahahahahahahahahaha

Name: Anonymous 2009-09-02 10:00

Don't worry /prog/, /g/ solved it. You can all go back to jerking off.

Name: Anonymous 2009-09-02 10:09

>>10
Don't worry, we will. Next time, just go straight to /g/ unless you've got a real question

Name: Anonymous 2009-09-02 10:24

>>11
/prog/ - Not-programming

Name: Anonymous 2009-09-02 10:24

The pleasures of being cummed inside.

Name: Anonymous 2009-09-02 10:25

I would have helped you if you had used [code] tags.

Name: Anonymous 2009-09-02 10:26

>>13
>>>/lounge/

Name: Anonymous 2009-09-02 11:13

>>14
I would have helped him if he wasn't BLIND AS FUCK

Name: Anonymous 2009-09-02 12:59

>>1
Um, that entire last code block is outside of your main() function.

I helped him, YHABT, HAND

Name: Anonymous 2009-09-02 13:06

I chortled at >>1-san's ``code''.

Name: Anonymous 2009-09-02 13:25

>>18
I chortled at your use of ``faggot quotes''

Name: Anonymous 2009-09-02 13:29

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.

Name: Anonymous 2009-09-02 13:52

>>19
Proper ``faggot quotes´´, please.

Name: Anonymous 2009-09-03 0:58

>>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.

Name: Anonymous 2009-09-03 11:35

>>21

FASHION QUOTESrulz

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