Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Beginer here with a problem

2012-09-09
2013-07-16
  • I m just starting out learning the ropes from the beginning....C++ for
    Dummies.

    I have this code as follows:

    include <iostream>

    include <stdlib.h>

    int main(int argc, char *argv)
    {
    cout << "hello, i am your compture talking" << endl;
    system ("pause");
    return 0;

    }

    and getting these errors...cout and endl are spelled correctly...just can
    figure it out.

    C:\Dev-Cpp\main.cpp
    In function int main(int, char**)': 6 C:\Dev-Cpp\main.cppcout' undeclared (first use this function)

    (Each undeclared identifier is reported only once for each function
    6 C:\Dev-Cpp\main.cpp
    `endl' undeclared (first use this function)
    C:\Dev-Cpp\Makefile.win
    Error 1

    Thanks for your help
    pandersonm@gmail.com

     
  • Ramor
    Ramor
    2012-09-20

    Hi, i just found your problem and my very first Dev-Cpp program i had. So look
    at this

    include <cstdlib>

    include <iostream>

    using namespace std;

    int main(int argc, char *argv)
    {
    cout << "Hello there \n \n" << endl;
    system("PAUSE");
    return EXIT_SUCCESS;

    Have fun

     
  • gina
    gina
    2013-07-16

    Post awaiting moderation.