Counting Thread

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

MX2

Lifer
Apr 11, 2004
18,651
1
0
On being bannned...

Originally posted by: AccruedExpenditure
Myself... 2 weeks for participating in S P I D E R chaining... it was lame cause all I said was S... it could have meant S anything =P

you?

Chaining again are we?;)
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: no0b
int n=0;
bool locked=false;
while(locked=false)
{
n=n++;
cout<<n<<endl;
}

If I was your TA for CompSci 101 I would give you a C- on this project.

n=n++;

I mean, come on....
 

her209

No Lifer
Oct 11, 2000
56,336
11
0
Originally posted by: Kyteland
Originally posted by: no0b
int n=0;
bool locked=false;
while(locked=false)
{
n=n++;
cout<<n<<endl;
}
If I was your TA for CompSci 101 I would give you a C- on this project.

n=n++;

I mean, come on....
It also results in an infinite loop due to the bolded line above. I give him an F.

 

vtqanh

Diamond Member
Jan 4, 2001
3,100
0
76
Originally posted by: Kyteland
Originally posted by: no0b
int n=0;
bool locked=false;
while(locked=false)
{
n=n++;
cout<<n<<endl;
}

If I was your TA for CompSci 101 I would give you a C- on this project.

n=n++;

I mean, come on....


haha. Good one. But the code will still compile
 

johnjbruin

Diamond Member
Jul 17, 2001
4,401
1
0
Originally posted by: her209
Originally posted by: Kyteland
Originally posted by: no0b
int n=0;
bool locked=false;
while(locked=false)
{
n=n++;
cout<<n<<endl;
}
If I was your TA for CompSci 101 I would give you a C- on this project.

n=n++;

I mean, come on....
It also results in an infinite loop due to the bolded line above. I give him an F.


seriously - my dog can write better code than that :D
 

BigJ

Lifer
Nov 18, 2001
21,330
1
81
I'd be very careful Accrued. Qosis got a vacation for creating 2 nef threads in the same day. This is probably one of your two strikes.
 

Kyteland

Diamond Member
Dec 30, 2002
5,747
1
81
Originally posted by: her209
Originally posted by: Kyteland
Originally posted by: no0b
int n=0;
bool locked=false;
while(locked=false)
{
n=n++;
cout<<n<<endl;
}
If I was your TA for CompSci 101 I would give you a C- on this project.

n=n++;

I mean, come on....
It also results in an infinite loop due to the bolded line above. I give him an F.
It's supposed to. Are you telling me AccruedExpenditure expects this thread to ever end? ;)

Still, I would have used 'while (1)' instead of declaring a variable.

// Count from 1 to infinity
int n=0;
while(1)
{
cout<<++n<<endl;
}

Edit: Oh, and he didn't comment. I don't buy in to this "My code is self commenting" crap.
 

BigJ

Lifer
Nov 18, 2001
21,330
1
81
Originally posted by: Kyteland
Originally posted by: her209
Originally posted by: Kyteland
Originally posted by: no0b
int n=0;
bool locked=false;
while(locked=false)
{
n=n++;
cout<<n<<endl;
}
If I was your TA for CompSci 101 I would give you a C- on this project.

n=n++;

I mean, come on....
It also results in an infinite loop due to the bolded line above. I give him an F.
It's supposed to. Are you telling me AccruedExpenditure expects this thread to ever end? ;)

Still, I would have used 'while (1)' instead of declaring a variable.

// Count from 1 to infinity
int n=0;
while(1)
{
cout<<++n<<endl;
}

Nice use of the ++n. Points awarded for style.