beginner: problems going from vc++ 5 to 6.0 
Author Message
 beginner: problems going from vc++ 5 to 6.0

Quote:

>I am new at this.  I am using iostream.h

>stuff I get to work on 5.0 at school don't work on 6.0 I have at home.

>it doesn't recognize my cout and cin.  can anyone help me with this problem.

>I am just trying to create a regular win 32 console app, c++ source file.



Which code doesn't work?  BTW, why are you using iostream.h ?
This should work for both compilers:

#include <iostream>
using namespace std;
int main()
{
    cout << "foo" << endl;
    return 0;

Quote:
}

Start with a small example, and build up - or post a small bit of the source you're having a problem with.

HTH

---
Mickey Williams
Author - Programming Windows NT Unleashed
Teach Yourself Visual C++ in 24 Hours
Essential Visual C++



Sat, 17 Mar 2001 03:00:00 GMT  
 beginner: problems going from vc++ 5 to 6.0
Anthony,

Are you including iostream.h or iostream (no extension)? Both include files
exist. The one with the .h extension defines cout and cin in the "blank"
namespace. The one with no extension defines them in the "std" namespace.

Either use iostream.h or prepend std:: on cout and cin.

for example:

#include <iostream>

. . .

    std::cout << "Hello world" << endl;

--
Dave Smith
MCSE, MCT, MVP

Quote:

>I am new at this.  I am using iostream.h

>stuff I get to work on 5.0 at school don't work on 6.0 I have at home.

>it doesn't recognize my cout and cin.  can anyone help me with this
problem.

>I am just trying to create a regular win 32 console app, c++ source file.





Sat, 17 Mar 2001 03:00:00 GMT  
 beginner: problems going from vc++ 5 to 6.0
[snip]
Quote:
>#include <iostream>

>. . .

>    std::cout << "Hello world" << endl;

[snip]

    // minor correction -
    std::cout << "Hello world" << std::endl;



Sun, 18 Mar 2001 03:00:00 GMT  
 beginner: problems going from vc++ 5 to 6.0
Absolutely correct! Thanks for the good eye, Jonathan.

--
Dave Smith
MCSE, MCT, MVP


Quote:
>[snip]
>>#include <iostream>

>>. . .

>>    std::cout << "Hello world" << endl;

>[snip]

>    // minor correction -
>    std::cout << "Hello world" << std::endl;



Sun, 18 Mar 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VC 6.0 editor drop-downs going away

2. vc++ 5.0 to vc++ 6.0 problem

3. Problem to convert from VC 6.0 to VC 7.1 because of using filebuf::setmode()

4. Printers gone on VC++ 6.0

5. VC 5.0 and VC 6.0 compatibility problem ?

6. Problem upgrading from VC 5.0 to VC 6.0

7. Problem converting VC++ 6.0 project to VC++.net

8. Problem porting ATL project from VC++ 6.0 to VC++.NET 2003

9. Memory Read/write problem using vc++ 6.0

10. Memory Read/write problem using vc++ 6.0

11. Help:VC++ 5.0 and VC++ 6.0 compatibility problems!

12. Help:VC++ 6.0 and VC++ 5.0 compatibility problems!

 

 
Powered by phpBB® Forum Software