My first OO C++ app

This is a discussion on My first OO C++ app within the C++ Programming forums, part of the General Programming Boards category; almost every compiler in existence seems to take a default return type of int with nothing more than a warning. ...

  1. #16
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    almost every compiler in existence seems to take a default return type of int with nothing more than a warning.
    I tried it in VC++6 and I didn't even get a warning, so it seems to me it has to be defaulting to int, which just happens to match the return type in the function definition, so no error.

  2. #17
    Registered User
    Join Date
    Sep 2003
    Posts
    135
    Implicit int was common in pre-standard C++. When C++ was standardised implicit int was dropped, same for C99. As pointed out, many (particularly older) compilers may accept it without warning.

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

Similar Threads

  1. non-MFC DLL with MFC app question.
    By Kempelen in forum Windows Programming
    Replies: 10
    Last Post: 08-20-2008, 07:11 AM
  2. array bounds overflow
    By BendingUnit in forum C Programming
    Replies: 3
    Last Post: 06-18-2006, 10:45 PM
  3. best program to start
    By gooddevil in forum Networking/Device Communication
    Replies: 4
    Last Post: 05-28-2004, 05:56 PM
  4. pasword app
    By GanglyLamb in forum C Programming
    Replies: 2
    Last Post: 06-07-2003, 10:28 AM
  5. OO in C
    By Shiro in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 01-05-2002, 10:02 PM

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