C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 09-25-2002, 12:32 PM   #1
Shadow12345
Guest
 
Posts: n/a
What the heck is wrong with this code?

I was working on this stupid code at my stupid school on stupid visual studio 6.0 and it worked FINE! I emailed the source to myself and it is giving me an error on this line of code:
Code:
Spaceship1->ForwardAngle >= Spaceship1->MaxAngle?Spaceship1->ForwardAngle += 0:Spaceship1- >ForwardAngle += -Spaceship1->TiltSpeed;
The error says:
lesson1\lesson01\Lesson1.cpp(748) : error C2059: syntax error : '>'



GOD HATES ME
  Reply With Quote
Old 09-25-2002, 12:34 PM   #2
Shadow12345
Guest
 
Posts: n/a
Nevermind for some reason the '->' symbol was cut apart...I fixed it...but I still can't figure out why it does that EVERY TIME I MAIL IT TO MYSELF

arg!
  Reply With Quote
Old 09-25-2002, 01:31 PM   #3
End Of Line
 
Hammer's Avatar
 
Join Date: Apr 2002
Posts: 6,240
why not email it as an attachment instead?
__________________
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
Hammer is offline   Reply With Quote
Old 09-25-2002, 01:32 PM   #4
and the hat of marbles
 
Sang-drax's Avatar
 
Join Date: May 2002
Location: Lund, Sweden
Posts: 2,041
I think the code is somewhat hard to read.

Spaceship1->ForwardAngle += 0 //??? Seems unnecessary

I like something like:
Code:
if (SpaceShip->ForwardAngle < Spaceship1->MaxAngle)
 Spaceship1->ForwardAngle -= Spaceship1->TiltSpeed;
__________________
Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling
Sang-drax is offline   Reply With Quote
Old 09-25-2002, 02:58 PM   #5
moi
Registered User
 
moi's Avatar
 
Join Date: Jul 2002
Posts: 945
Re: What the heck is wrong with this code?

edit: n/m
__________________
hello, internet!
moi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
what is wrong in this simple code vikingcarioca C Programming 4 04-23-2009 07:10 AM
Error msg regarding the Switch loop, What's wrong in my code? althagafi C Programming 7 08-06-2004 09:14 AM
what is wrong with this code please korbitz Windows Programming 3 03-05-2004 10:11 AM
what's wrong with the following code? catalyst C Programming 1 11-07-2003 04:30 AM
can someone check my code and tell me what I'm doing wrong jlmac2001 C++ Programming 7 09-20-2003 08:14 PM


All times are GMT -6. The time now is 02:12 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

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