circular variables

I'm running bloodshed and I typed in

// operating with variables

#include <iostream>
using namespace std;

int main ()
{
//declaring variables
int a, b;
int result;

//process
a = 5;
b = 2;
a = a + 1;
result = a - b;

//print out result
cout << result;

//terminate the program
return 0;
}

but when I try to compile and run nothing happens and a note appears at the bottom saying
"Circular Variables <- Variables.o dependency dropped."

and

"C:\Documents and Settings\Owner\Desktop\DevTut\Makefile.win [Build Error] [Project1.exe] Error 1"

I'm totally new and just reading out of the tutorial on the site. Any help would be greatly appreciated :)
No idea about the error (MinGW compiles without errors or warnings), but what exactly do you mean by "circular variable"?
No problem compiling with my g++ either... Have you tried commenting out variables until the message disappears?
I figured it out :) I had put it as a part of a project and when I took it out it worked fine. Outta curiosity, whys it do that?
What's the "it" that you put in and subsequently took out?
Just a suggestion try and get Code::Blocks or the MS Visual Studio Express

The variable program is the "it". Sorry about that. I had the variable program in a project with hello world and when I deleted hello world (so the variable prg is all by itself in the project), the variable program worked fine.

I'm also trying code::blocks now thanks for the suggestion :D
Last edited on
Topic archived. No new replies allowed.