Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,500 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,727 people online right now. Registration is fast and FREE... Join Now!




velocity help

 
Reply to this topicStart new topic

velocity help

svuaddict12
5 Mar, 2008 - 09:05 PM
Post #1

New D.I.C Head
*

Joined: 3 Mar, 2008
Posts: 12

Hello. I have my formulas right for my velocity problem, but it will not compile. It is giving me the following error expected `;' before "cout"

CODE
cout << "something it took for a fighter to accelerate to takeoff is"
      << something << " seconds. endl"


I am also gettin the following error which i have never seen before
In function `int main()':

This post has been edited by svuaddict12: 5 Mar, 2008 - 09:06 PM
User is offlineProfile CardPM
+Quote Post

ddollar
RE: Velocity Help
5 Mar, 2008 - 09:18 PM
Post #2

New D.I.C Head
*

Joined: 16 Jan, 2008
Posts: 30


couple of boo-boo's to fix. don't forget the ; after endl

cout << "something it took for a fighter to accelerate to takeoff is " // white-space after is
<< something << " seconds." << endl; // double-quotes after seconds, then insertion, then endl;



QUOTE(svuaddict12 @ 5 Mar, 2008 - 10:05 PM) *

Hello. I have my formulas right for my velocity problem, but it will not compile. It is giving me the following error expected `;' before "cout"

CODE
cout << "something it took for a fighter to accelerate to takeoff is"
      << something << " seconds. endl"


I am also gettin the following error which i have never seen before
In function `int main()':


User is offlineProfile CardPM
+Quote Post

Nykc
RE: Velocity Help
5 Mar, 2008 - 09:21 PM
Post #3

sudo rm -R /
Group Icon

Joined: 14 Sep, 2007
Posts: 4,146



Thanked: 16 times
Dream Kudos: 275
My Contributions
Make sure the << is after seconds. and endl; as ddollar described that is why you are receiving the error.

cpp
 cout << something << " seconds." << endl; 


I only stepped in because you didn't mention the << but posted it. smile.gif

This post has been edited by Nykc: 5 Mar, 2008 - 09:23 PM
User is offlineProfile CardPM
+Quote Post

svuaddict12
RE: Velocity Help
5 Mar, 2008 - 09:58 PM
Post #4

New D.I.C Head
*

Joined: 3 Mar, 2008
Posts: 12

QUOTE(ddollar @ 5 Mar, 2008 - 10:18 PM) *

couple of boo-boo's to fix. don't forget the ; after endl

cout << "something it took for a fighter to accelerate to takeoff is " // white-space after is
<< something << " seconds." << endl; // double-quotes after seconds, then insertion, then endl;



QUOTE(svuaddict12 @ 5 Mar, 2008 - 10:05 PM) *

Hello. I have my formulas right for my velocity problem, but it will not compile. It is giving me the following error expected `;' before "cout"

CODE
cout << "something it took for a fighter to accelerate to takeoff is"
      << something << " seconds. endl"


I am also gettin the following error which i have never seen before
In function `int main()':








thanks 4 the help

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 08:08PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month