9 Replies - 752 Views - Last Post: 02 January 2011 - 03:46 AM

#1 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6036
  • View blog
  • Posts: 23,430
  • Joined: 23-August 08

The Perils of Programming in Turbo C

Posted 25 December 2010 - 08:37 PM

We told you fflush(stdin) invoked undefined behavior, and that it's ALWAYS int main(void), not void main, but did you listen??? No, no you did not.

And THAT is why you can't have nice things.

Is This A Good Question/Topic? 0
  • +

Replies To: The Perils of Programming in Turbo C

#2 bodom658  Icon User is offline

  • Villiage Idiom
  • member icon

Reputation: 113
  • View blog
  • Posts: 1,123
  • Joined: 22-February 08

Re: The Perils of Programming in Turbo C

Posted 25 December 2010 - 09:15 PM

I do a lot of tutoring in C and C++, and if I see void main, I correct them right away. May as well stick your finger in a light socket after taking a shower.
Was This Post Helpful? 0
  • +
  • -

#3 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10387
  • View blog
  • Posts: 38,437
  • Joined: 27-December 08

Re: The Perils of Programming in Turbo C

Posted 25 December 2010 - 10:38 PM

Perhaps they were using this:
Attached Image
Was This Post Helpful? 0
  • +
  • -

#4 KYA  Icon User is offline

  • g++ jameson.cpp -o beverage
  • member icon

Reputation: 3093
  • View blog
  • Posts: 19,139
  • Joined: 14-September 07

Re: The Perils of Programming in Turbo C

Posted 26 December 2010 - 11:55 AM

hahahahahaha, rep is in order dear Jack
Was This Post Helpful? 0
  • +
  • -

#5 Munawwar  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 162
  • View blog
  • Posts: 457
  • Joined: 20-January 10

Re: The Perils of Programming in Turbo C

Posted 26 December 2010 - 01:26 PM

Hey Hey, we Indians have feelings you know? :cry2:
Was This Post Helpful? 0
  • +
  • -

#6 brds  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 76
  • View blog
  • Posts: 515
  • Joined: 22-October 08

Re: The Perils of Programming in Turbo C

Posted 26 December 2010 - 01:43 PM

Well said Jack, well said.
Was This Post Helpful? 0
  • +
  • -

#7 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 990
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: The Perils of Programming in Turbo C

Posted 31 December 2010 - 04:22 AM

View PostMunawwar, on 27 December 2010 - 05:26 AM, said:

Hey Hey, we Indians have feelings you know? :cry2:


And at least India has joined the rest of the world in measuring things using the commonly agreed ruler.

The US still uses measurements from the country they fought a war to get free from. Very strange.

And when we don't all use the same ruler things can go so wrong:
http://www.savive.co...ateorbiter.html
Was This Post Helpful? 0
  • +
  • -

#8 Salem_c  Icon User is offline

  • void main'ers are DOOMED
  • member icon

Reputation: 1628
  • View blog
  • Posts: 3,087
  • Joined: 30-May 10

Re: The Perils of Programming in Turbo C

Posted 31 December 2010 - 09:31 AM

> The US still uses measurements from the country they fought a war to get free from
Yeah, and then proceeded to reinvent a load of them to be ever so slightly different as well.
http://en.wikipedia....urement_systems
Was This Post Helpful? 0
  • +
  • -

#9 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2531
  • View blog
  • Posts: 4,631
  • Joined: 24-September 10

Re: The Perils of Programming in Turbo C

Posted 31 December 2010 - 11:45 AM

If you had read that you would notice that they actually didn't reinvent a whole ton of them.

The Brits reinvented their measurements after the US broke off from them.



It's in the opening statement!

Quote

Having this shared heritage, the two systems are quite similar, but there are differences. The US customary system is based on English systems of the 18th century, while the Imperial system was defined in 1824, after American independence.

This post has been edited by lordofduct: 31 December 2010 - 11:47 AM

Was This Post Helpful? 0
  • +
  • -

#10 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 782
  • View blog
  • Posts: 7,610
  • Joined: 05-May 05

Re: The Perils of Programming in Turbo C

Posted 02 January 2011 - 03:46 AM

View Postbodom658, on 25 December 2010 - 09:15 PM, said:

I do a lot of tutoring in C and C++, and if I see void main, I correct them right away. May as well stick your finger in a light socket after taking a shower.


I use void main sometimes. I'd like not try not to impose my own views about the "correct" way of doing things on the students who I see show up in my office hours (all two of them).

Haha, well, too bad for them our C compiler we use to grade gives a warning if they use void main and it takes some points off of their assignment.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1