944,030 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 6921
  • C++ RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Mar 14th, 2003
0
Re: Java
What do you mean by the latest version? The beta version? 5? I'm using 4 and the code I posted with "<iostream.h>" works and has always worked for me.
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002
Mar 14th, 2003
0
Re: Java
4.9.7.0
Bob
Team Colleague
Reputation Points: 15
Solved Threads: 2
Junior Poster
Bob is offline Offline
129 posts
since Feb 2003
Mar 15th, 2003
0
Re: Java
I'm downloading updates as I type... will post with result after!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
boohoo is offline Offline
11 posts
since Mar 2003
Mar 15th, 2003
0
Re: Java
Nope :

The top line of

#include <iostream>
using namespace std;
int main()
{
cout << "hello, world" << endl;
cin.get();
}


is made all red and a load of errors appear like :
C:\Dev-Cpp\include\c++\iostream:44
bits/c++config.h: No such file or directory.


According to dev cpp, i'm using version 4.9.7.8 .

Any help will be appreciated, and I know this is a great program and I wanna use it
Reputation Points: 10
Solved Threads: 0
Newbie Poster
boohoo is offline Offline
11 posts
since Mar 2003
Mar 15th, 2003
0
Re: Java
Have you checked the compiler options that I wrote about?
Bob
Team Colleague
Reputation Points: 15
Solved Threads: 2
Junior Poster
Bob is offline Offline
129 posts
since Feb 2003
Mar 15th, 2003
0
Re: Java
I am missing the last one, I was hoping the update may fix this. Any other ideas? I do have a copy of Metrowerks Codewarrior 5, but it's slightly different.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
boohoo is offline Offline
11 posts
since Mar 2003
Mar 15th, 2003
0
Re: Java
Just add the last path to your compiler options and it should compile OK. The dev-cpp directory will be the same as for the others.
Bob
Team Colleague
Reputation Points: 15
Solved Threads: 2
Junior Poster
Bob is offline Offline
129 posts
since Feb 2003
Mar 18th, 2003
0
Re: Java
You star It's all working and hoo.exe ran but the window closed before I could see hello world .
Any line of code i should add to get a 'press any button to continue'?

Thank you ever so much, I am really looking forward to programming in C++ now, my first compiled language

C++ Syntax (Toggle Plain Text)
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5. cout << "Hello World From About\n";
  6. return (0);
  7. }
Reputation Points: 10
Solved Threads: 0
Newbie Poster
boohoo is offline Offline
11 posts
since Mar 2003
Mar 18th, 2003
0
Re: Java
The answer is in the previous posts. Dev-c++ will close the console window as soon as the program terminates, so all you have to do is out in a command that stops it from terminating until you're ready. Simplest is just:

cin.get();

This will wait for you to press enter. In some instances you may want to add the following:

cin.ignore(1000,'\n');
cin.get();

Good luck!
Bob
Team Colleague
Reputation Points: 15
Solved Threads: 2
Junior Poster
Bob is offline Offline
129 posts
since Feb 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: question
Next Thread in C++ Forum Timeline: Games





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC