Results 1 to 8 of 8

Thread: Problem in C++

  1. #1
    Join Date
    Jan 2007
    Posts
    3

    Default Problem in C++

    I use visual C++.
    When I do this code and compile it -

    Code:
    #include <iostream>
    #include <stdio>
    int main()
    {
    char str[100];
    cout << "Enter a word: \n";
    gets (str);
    return 0;
    }
    it workd like

    Code:
    #include <iostream>
    #include <stdio>
    int main()
    {
    char str[100];
    gets (str);
    cout << "Enter a word: \n";
    return 0;
    }
    I meen that the "gets" workd before the "cout"

    Why ???

  2. #2
    Join Date
    Jun 2006
    Posts
    17

    Default

    Ornami its because of the bugs in microsoft visual c++ compiler tru the turboc 3 compiler

  3. #3
    Join Date
    Apr 2007
    Posts
    3

    Default

    #include <iostream>
    #include <stdio>
    int main()
    {
    char str[100];
    gets (str);
    cout << "Enter a word: \n";
    return 0;
    }

  4. #4
    Join Date
    Apr 2007
    Posts
    3

    Default

    try replacing the gets with a cin, it's probably a bug in microsoft's stupid compiler...

  5. #5

    Default

    Tell me the working of

    #define hi(a,b) b##a

    void hi(in,ma)()
    {
    cout<<"hi"
    }

  6. #6
    Join Date
    Jun 2007
    Posts
    2

    Default

    you need a location were to save

  7. #7
    Join Date
    Jul 2007
    Posts
    1

    Default

    try useing

    cin>>str;

    inted of

    gets(str);

  8. #8
    Join Date
    Aug 2007
    Location
    India
    Posts
    12

    Default nice to see a forum about c++

    nice to see a forum about c++....I am really intrested in programing in c++

Bookmarks

Posting Permissions

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