Real newbie in need of help

This is a discussion on Real newbie in need of help within the C++ Programming forums, part of the General Programming Boards category; OMG Dev-C++ really !!! ( note : REALLLY ) suck i tested EACH codes and they all point me to ...

  1. #16
    Registered User
    Join Date
    Jul 2002
    Posts
    13
    OMG Dev-C++ really !!! ( note : REALLLY ) suck i tested EACH codes and they all point me to the same error !! ill try another compiler for sure ..

  2. #17
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    It isn't Dev-C++ (mingw). It is the fact that you are using non standard functions. Just have the program look for input by using cin.

  3. #18
    Sir Mister Insane Sako Klinerr1's Avatar
    Join Date
    May 2002
    Posts
    608
    why does somepoepel use
    std::cout <<
    instead of
    cout <<

    whats the difference?
    Email: Klinerr1@nc.rr.com || AIM: MisterSako || MSN: sakotheinsane@hotmail.com

    -the shroom has spoken

  4. #19
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    only use std::cout if you #include <iostream> without using namespace std;

    (std specifies the namespace, no kidding!)
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  5. #20
    Registered User GrNxxDaY's Avatar
    Join Date
    Jul 2002
    Posts
    140
    It seems to me ( a newbie ) that Dev-C++ automatically replaces any occurance of getch() with getchar(). Does anyone else think so? Cause I use dev and i get the same exact error that says implicit declaration of getchar(), and it points to the line with getch().
    AOL: GrNxxDaY
    IDE: Dev-C++ Beta 5 (v4.9.4.1)
    Project: Eye of Sahjz (text-RPG)
    If you think I may need help, please IM me.

  6. #21
    Registered User moonwalker's Avatar
    Join Date
    Jul 2002
    Posts
    282

    Re: Real newbie in need of help

    Originally posted by TheDarKinG
    would u recommend cause with learn C++ in 21 days i got errors everytime i test their examples ..
    I started with the same book about a month and a half, or two ago.. I didn't get any errors..

    get a good compiler (BC++ 5.5 for one) and then read the book properly.. that's all i can suggest.

    if you still get errors, then post the code and someone here may help.

  7. #22
    Registered User
    Join Date
    Oct 2001
    Posts
    68

    Try These

    I can recommend you some websites

    http://www.cplusplus.com
    http://www.cppreference.com

    Plus if you are using C++.\

    try these to pause

    cin.get();

    will work 100%

    Thanks
    Pratik

  8. #23
    Unregistered
    Guest
    Use standard C++ whenever possible. I use cin >> personally.

    Code:
    //compilers not namespace compliant
    #include <iostream.h>
    int main()
    {
       cout << "hello world" << endl;
       char ch;
       cout << "to stop the program, press any key and then the enter key" << endl;
       cin >> ch;
       return 0;
    }
    
    
    //namespace compliant compilers
    //recommended syntax for absolute beginners, not for others
    #include <iostream>
    using namespace std;
    int main()
    {
      cout << "hello world" << endl;
      char ch;
      cin >> ch;
      return 0;
    }
    
    //namespace compliant compilers
    //one recommended syntax
    #include <iostream>
    using std::cout;
    using std::cin;
    int main()
    {
      cout << "hello world" << endl;
      char ch;
      cin >> ch;
      return 0;
    }
    
    //namespace compliant compilers
    //alternate recomended syntax
    #include <iostream>
    int main()
    {
      std::cout << "hello world" << endl;
      char ch;
      std::cin >> ch;
      return 0;
    }
    Why all the possibilities? Well, for one thing, there are many compilers in use today that aren't namespace compliant. Forcing everyone to use a single variety of compiler would not be cool, although it would improve the learning curve for newbies as they wouldn't have to filter through all the possibilities. For another, at some point you may use more than one namespace or an alternate to the std namespace. Placing the std:: before each function call requires more typing, but it makes absolutely clear which namespace you are using for which function. Being as clear as possible as to what you are doing is very important in programming. That's one of the things makes it neat for me: to be a decent programmer you need to be aware of both the big picture and the details.

    In addition to knowing whether your compiler is namespace compliant you also need to know whether your book/tutorial is written for namespace compliant compilers or not. If your book is using namespace compliant syntax but your compiler doesn't comply, or visa versa, you will need to make some adjustments.

  9. #24
    Registered User
    Join Date
    Jul 2002
    Posts
    13
    Ok thx to all of u

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. %16 with double
    By spank in forum C Programming
    Replies: 11
    Last Post: 03-05-2006, 09:10 PM
  2. need real newbie help (operators)
    By Elderon in forum C Programming
    Replies: 4
    Last Post: 08-09-2002, 07:50 PM
  3. Programming Puns
    By kermi3 in forum A Brief History of Cprogramming.com
    Replies: 44
    Last Post: 03-23-2002, 03:38 PM
  4. Replies: 7
    Last Post: 12-12-2001, 09:28 AM
  5. Real newbie with VC6 questions
    By MagiZedd in forum Windows Programming
    Replies: 8
    Last Post: 10-15-2001, 08:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21