Creating an OS

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2006
Posts: 103
Reputation: Tauren is an unknown quantity at this point 
Solved Threads: 0
Tauren Tauren is offline Offline
Junior Poster

Re: Creating an OS

 
0
  #41
Oct 31st, 2006
That was FUN!!!

But ERROR


a < 5 // Checks to see if a is less than five
a > 5 // Checks to see if a is greater than five
a == 5 // Checks to see if a equals five, for good measure

Could not compile

[code=c++ a < 5 // Checks to see if a is less than five
a > 5 // Checks to see if a is greater than five
a == 5 // Checks to see if a equals five, for good measure
[/code]
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Creating an OS

 
0
  #42
Oct 31st, 2006
Those aren't entire C++ statements. They're just examples, or "snippets". For example, you could use one of the expressions like the following:
  1. #include <iostream>
  2.  
  3. int main() {
  4. int a = 6;
  5.  
  6. if (a>5) {
  7. std::cout << "The variable 'a' is larger than 5.\n";
  8. }
  9. }

Those expressions at the end of the tutorial were just examples. I hope this makes sense.
Last edited by John A; Oct 31st, 2006 at 7:39 pm.
"Technological progress is like an axe in the hands of a pathological criminal."
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 103
Reputation: Tauren is an unknown quantity at this point 
Solved Threads: 0
Tauren Tauren is offline Offline
Junior Poster

Re: Creating an OS

 
0
  #43
Nov 1st, 2006
Dont cin.get(); It keeps it from closing up
Reply With Quote Quick reply to this message  
Join Date: Apr 2006
Posts: 5,051
Reputation: John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold John A is a splendid one to behold 
Solved Threads: 332
Team Colleague
John A's Avatar
John A John A is offline Offline
Vampirical Lurker

Re: Creating an OS

 
0
  #44
Nov 1st, 2006
Originally Posted by Tauren View Post
Dont cin.get(); It keeps it from closing up
Usually you want cin.get to execute when your program finishes on a compiler like Dev-C++. Why? Because users will usually double-click on your app, which will open a DOS prompt window, and when the program is done, the window will close immediately, so the user can't see the final messages printed out by the program.

On many compilers, cin.get is not needed, automatically append code to do this (Such as Visual C++) to save you the trouble.
"Technological progress is like an axe in the hands of a pathological criminal."
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 103
Reputation: Tauren is an unknown quantity at this point 
Solved Threads: 0
Tauren Tauren is offline Offline
Junior Poster

Re: Creating an OS

 
0
  #45
Nov 2nd, 2006
Its alright I just have a question about the loops what the hell do they really do just when u put in anser it keeps the thing from just exiting oe what?
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,614
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 466
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Creating an OS

 
0
  #46
Nov 2nd, 2006
Loops are a very important constructs in programming.

Imagine you want to gather data from 100 clients and put it in an array of client data. Imagine doing that without loop:
  1. cout << "Enter data of client 1: " ;
  2. cin >> record[0] ;
  3. cout << "Enter data of client 2: " ;
  4. cin >> record[1] ;
  5. cout << "Enter data of client 3: " ;
  6. cin >> record[2] ;
  7.  
  8. // ... and so on till 100

With loops its like:
  1. for( int i = 0; i < 100; ++i )
  2. {
  3. cout << "Enter data of client " << i + 1 << ": " ;
  4. cin >> record[i] ;
  5. }
  6. // end of data gathering phase

Hope you get the drift...
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 15
Reputation: DanielSmith is an unknown quantity at this point 
Solved Threads: 0
DanielSmith DanielSmith is offline Offline
Newbie Poster

Re: Creating an OS

 
0
  #47
Nov 3rd, 2006
assembly language is necessary,i think. Creating an OS is not a easy job, the first thing you need to do is getting the source code of the existing OS and read it.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC