Results 1 to 13 of 13

Thread: Please help me in C++ simple program

Threaded View

  1. #5
    Frenzied Member 2kaud's Avatar
    Join Date
    May 2014
    Location
    England
    Posts
    1,170

    Re: Please help me in C++ simple program

    You are not using ansi c++ which is now the standard. You are using a version of c++ from prior to about 1998 before the ansi c++ standard was formalised. This code
    Code:
    #include<iostream.h>
    int main()
    {
        cout<<"sonia";
        return 0;
    }
    is not ansi c++ and would not compile using current compilers. I would strongly suggest you change your compiler to a more up-to-date one that conforms to ansi c++ standard. The current version is c++11. You are likely to come across these compatibility issues again using dev c++.

    What os are you using? For Windows I would suggest Visual c++ express which is free.

    From where are you learning c++? I would suggest you have a look at
    http://www.learncpp.com/
    http://www.cplusplus.com/doc/tutorial/
    http://www.tutorialspoint.com/cplusplus/index.htm
    Last edited by 2kaud; May 9th, 2014 at 06:54 AM.
    All advice is offered in good faith only. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/

    C++23 Compiler: Microsoft VS2022 (17.6.5)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width