Off Topic: The Flood
This topic has moved here: Subject: Could someone who knows C++ answer my question...
  • Subject: Could someone who knows C++ answer my question...
Subject: Could someone who knows C++ answer my question...
  • gamertag:
  • user homepage:
  • last post: 01.01.0001 12:00 AM PDT

OK, im writing a program that prints prime numbers, i keep on getting parse errors, i need help getting rid of them... here is my code (i use Dev-C++ compiler):

#include <iostream>

using ::std

int main()
{

int x=y % z, y++, z++;
int y=1;
int z=1;

if(x = 0 || x = 1)
{
cout << y "\n";
}

else()
{
cout << "";
}

return 0;
}

im getting a parse error before 'if' and before 'int' in int main...

[Edited on 9/28/2004 4:45:41 PM]

  • 09.28.2004 4:45 PM PDT
  • gamertag:
  • user homepage:
  • last post: 01.01.0001 12:00 AM PDT

is that html?

  • 09.28.2004 4:46 PM PDT

Add the email above to your MSN to contact me with emergencies on the forum.

FOR CARNAGE, APPLY WITHIN
Marathon, Myth, and MORE (Under construction)

NO U! A Webcomic.
Mob Of Angry Peasants Chat

Posted by: lellowranger
is that html?


Not at all -- It's coding - C++, and I don't know a bit of it -- See if one of the Bungie Guys is online...

  • 09.28.2004 4:48 PM PDT
  • gamertag:
  • user homepage:
  • last post: 01.01.0001 12:00 AM PDT

This topic belongs in The Flo...oh, sorry. I'm too used to people posting in the wrong forum. I don't know C++, so I'm not sure if this is what you're looking for here. I just Googled for 'C++ prime number code', so I would suggest trying that, or some form of 'C++ prime number'

  • 09.28.2004 4:50 PM PDT
  • gamertag:
  • user homepage:
  • last post: 01.01.0001 12:00 AM PDT

hm... yea, that technically is it but i think that is really out of the way... (doing more work that has to be done)...

  • 09.28.2004 5:39 PM PDT
  • gamertag:
  • user homepage:
  • last post: 01.01.0001 12:00 AM PDT

Well, like I said, C++ isn't my thing (SQL is). The only thing I can say is search Google, or keep asking other forums. Good luck!

...that code was a lot longer than yours, wasn't it?

  • 09.28.2004 6:21 PM PDT