Help using Turbo C (or other compiler) for C++

Im New at Programming(Newbie)

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

37 Replies - 4661 Views - Last Post: 16 January 2010 - 08:48 AM Rate Topic: -----

#1 `£ightßyuzaki`  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 12-January 10

Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 07:43 AM

Im just new to programming and i don't know how to code on C++ in tubro c and its not like the c language that I had before when i was at first semester im have been looking for tutorials and samples in the internet and can't find any site would help me in my studies I use samples like this:

#include<iostream.h>
using spacename std;

int main()
Is This A Good Question/Topic? 0
  • +

Replies To: Help using Turbo C (or other compiler) for C++

#2 `£ightßyuzaki`  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 12-January 10

Re: Help using Turbo C (or other compiler) for C++

Post icon  Posted 12 January 2010 - 07:45 AM

Im just new to programming and i don't know how to code on C++ in tubro c and its not like the c language that I had before when i was at first semester im have been looking for tutorials and samples in the internet and can't find any site would help me in my studies I use samples like this:

#include<iostream.h>
using spacename std;

int main()
{
cout << "Hello World!";
return 0;
}

i know this is just basic but i can't seem to run it in a compilier
can you help me with this and if its possible can you give me some sites on where can i find some codes from basic to advance.
Was This Post Helpful? 0
  • +
  • -

#3 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6066
  • View blog
  • Posts: 23,526
  • Joined: 23-August 08

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 07:46 AM

It's namespace, not spacename.
Was This Post Helpful? 0
  • +
  • -

#4 KYA  Icon User is offline

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

Reputation: 3105
  • View blog
  • Posts: 19,144
  • Joined: 14-September 07

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 07:48 AM

If you know how to program in C then moving to C++ shouldn't be too hard of a problem, at least from the fundamental perspective. Feel free to check out the tutorials here at DIC. I also find cplusplus.com a great reference.

Threads merged please do not create duplicate topics on the same subject.
Was This Post Helpful? 0
  • +
  • -

#5 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 729
  • View blog
  • Posts: 8,642
  • Joined: 14-September 07

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 07:50 AM

Well there are plenty of tutorials and snippets right here on D.I.C.

As far as other online resources:
http://cplusplus.com/ - is a really good place to find information.

#include<iostream>
using namespace std;

int main() {
cout << "Hello, World!";

return 0;
}



not sure about using Turbo C - but Code::Blocks is a great IDE.

edit- lol - a lot has changed since the time I started typing this reply.

There is also a free eBook - neat series they did it for Java and Python also
http://www.mindview....ingInCPP2e.html

This post has been edited by Nykc: 12 January 2010 - 07:52 AM

Was This Post Helpful? 0
  • +
  • -

#6 poncho4all  Icon User is offline

  • D.I.C Head!
  • member icon

Reputation: 123
  • View blog
  • Posts: 1,405
  • Joined: 15-July 09

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 07:55 AM

If you are going to be using C++ your code should look like this

#include <iostream> // no .h since we are not using de precompiled 
using namespace std; 

int main(){
	 cout<<"Hello World!";
	 return 0;
}



well for pausing the window you could use any of the suggestions here http://www.dreaminco...wtopic30581.htm

Good Luck

PS: by the way change Turbo C to any other compiler, like

Visual Studio
Cygwin

or any of the many in the web :P

EDIT: Nykc posted this before sorry my internet is to slow

This post has been edited by poncho4all: 12 January 2010 - 07:56 AM

Was This Post Helpful? 0
  • +
  • -

#7 `£ightßyuzaki`  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 12-January 10

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 08:18 AM

thank you guys for the reply and the link and this would be a great help and yes it should not be hard for me cause i know C language but i missed the first 2 classes that's why i am advancing to learn this and be good at c++ thank you again and i cannot change compilier because we use the TC 3.0 at school we only use the VStudio when we use the VB and i don't knw why our instructor does not use VS

EDIT: guys i think the code you gave me will only work in Vstudio not in TC am i Right?

This post has been edited by `£ightßyuzaki`: 12 January 2010 - 08:24 AM

Was This Post Helpful? 0
  • +
  • -

#8 jjl  Icon User is online

  • Engineer
  • member icon

Reputation: 1076
  • View blog
  • Posts: 4,536
  • Joined: 09-June 09

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 08:57 AM

no thats standard c++, it works everywhere

Are you using turbro C, or turbo C++. I dont use turbo so i dont know if theres is a difference, but there might
Was This Post Helpful? 0
  • +
  • -

#9 `£ightßyuzaki`  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 12-January 10

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 09:01 AM

im using the turbo c 3.0 and im having some errors

EDIT: the errors - Unable to open include fle IOSTREAM
Decleration syntex error
Undefined symbol cout

This post has been edited by `£ightßyuzaki`: 12 January 2010 - 09:07 AM

Was This Post Helpful? 0
  • +
  • -

#10 KYA  Icon User is offline

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

Reputation: 3105
  • View blog
  • Posts: 19,144
  • Joined: 14-September 07

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 09:03 AM

We aren't mind readers. Post an updated code listing with errors you are receiving.
Was This Post Helpful? 0
  • +
  • -

#11 jjl  Icon User is online

  • Engineer
  • member icon

Reputation: 1076
  • View blog
  • Posts: 4,536
  • Joined: 09-June 09

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 09:10 AM

does Turbo C compile C++ also? or do you need Turbo C++? thats what it sounds like to me
Was This Post Helpful? 0
  • +
  • -

#12 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6066
  • View blog
  • Posts: 23,526
  • Joined: 23-August 08

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 11:15 AM

See, the problem is YOU'RE USING AN ANCIENT COMPILER!!! It's like being told to build a tree house, but being forced to use a rock instead of a hammer.

Because of that, you have to ignore what poncho4all said regarding leaving off the .h from the include files. It also means you're going to have trouble learning outside of the classroom (and your texts) because most people not in Asia ARE USING MODERN COMPILERS!!!
Was This Post Helpful? 0
  • +
  • -

#13 jjl  Icon User is online

  • Engineer
  • member icon

Reputation: 1076
  • View blog
  • Posts: 4,536
  • Joined: 09-June 09

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 11:39 AM

haha i agree 100% with jack. And so what if you use a different compiler at school. Your learning standard c++. Download VC++ (microsoft), or code::blocks
Was This Post Helpful? 0
  • +
  • -

#14 optix212  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 27
  • View blog
  • Posts: 509
  • Joined: 10-October 09

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 12:17 PM

how come i see so many people using TurboC these days? Everyone that uses it gets razzed. Personally, i've never even tried it, i started with DevC++ and then worked my way up to MS VC++...
Was This Post Helpful? 0
  • +
  • -

#15 KYA  Icon User is offline

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

Reputation: 3105
  • View blog
  • Posts: 19,144
  • Joined: 14-September 07

Re: Help using Turbo C (or other compiler) for C++

Posted 12 January 2010 - 12:20 PM

It's usually a [forced] academic constraint.

I'm glad I avoided whoever still uses it.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3