Comparision Between Tarbo C++, Visual C++

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2008
Posts: 78
Reputation: jeevsmyd is an unknown quantity at this point 
Solved Threads: 0
jeevsmyd's Avatar
jeevsmyd jeevsmyd is offline Offline
Junior Poster in Training

Comparision Between Tarbo C++, Visual C++

 
0
  #1
Oct 6th, 2008
Hiii
I m just a beginner in C++...Was using turbo c++v3.0... Now just installed Visual c++ 2008 express edition.... Anyone please let me know the main differences between TC++ and VC++?.... how can i make a simple programme written in tc++ run in vc++..which are the modifications?... ".H" could be avoided,right? any other other changes required??
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,614
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 713
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Comparision Between Tarbo C++, Visual C++

 
0
  #2
Oct 6th, 2008
>Anyone please let me know the main differences between TC++ and VC++?
They're too numerous to list, especially considering the fact that Turbo C++ 3.0 is ancient and Visual C++ 2008 is state of the art.

>how can i make a simple programme written in tc++ run in vc++
Post it and I'll tell you. Most likely you'll need to update your use of the C++ library to match the standard, and the rest of the code will be largely transferable without any changes.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 89
Reputation: bhoot_jb is on a distinguished road 
Solved Threads: 2
bhoot_jb bhoot_jb is offline Offline
Junior Poster in Training

Re: Comparision Between Tarbo C++, Visual C++

 
0
  #3
Oct 6th, 2008
differences ?
i think it would suffice to say that TC++ is one of the ancient compilers for C/C++ while VC++ is one of the modern compilers (infact, IDE) for C/C++ applications.

I think you are asking so because TC++ was/is being used in your college/school.
I guessed so because we are still required to work with that age-old compiler.

Anyways, basically, the coding standards remains mostly the same, i refer to the syntax and all that. However, the structure of the code does differ in both. Also, .H files certainly cannot be avoided. VC++ also includes files of other types, which you can know only if you go through the stuffs by yourself.
Bhoot
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 78
Reputation: jeevsmyd is an unknown quantity at this point 
Solved Threads: 0
jeevsmyd's Avatar
jeevsmyd jeevsmyd is offline Offline
Junior Poster in Training

Re: Comparision Between Tarbo C++, Visual C++

 
0
  #4
Oct 6th, 2008
Yeah at school TC++ is being used.. and now I have a big problem... Is there any way to input/output data in c++? Anything other than cout/cin.... cin would wait for the user to enter... What i want is something which wont wait for the user after a fixed time..

plss help me

Jeevan
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 118
Reputation: chococrack is on a distinguished road 
Solved Threads: 14
chococrack's Avatar
chococrack chococrack is offline Offline
Junior Poster

Re: Comparision Between Tarbo C++, Visual C++

 
0
  #5
Oct 6th, 2008
Follow this link and read up on ctime for MFC applications. Seems you just need to set up a time interval of some sort, (ie if the user twiddles thumbs for 30 seconds, just continue)

http://www.cplusplus.com/reference/clibrary/ctime/

Also for developing small projects at home I find Bloodshed Dev++ to be very affordable and efficient.

http://www.bloodshed.net/devcpp.html
Last edited by chococrack; Oct 6th, 2008 at 12:19 pm.
I would love to change the world, but they won't give me the source code
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 3,813
Reputation: VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute VernonDozier has a reputation beyond repute 
Solved Threads: 501
Featured Poster
VernonDozier VernonDozier is offline Offline
Senior Poster

Re: Comparision Between Tarbo C++, Visual C++

 
0
  #6
Oct 6th, 2008
Originally Posted by jeevsmyd View Post
".H" could be avoided,right? any other other changes required??
Originally Posted by bhoot_jb View Post
Also, .H files certainly cannot be avoided.
I think the avoidance of .h files topic stems from an earlier post from me on a different thread. Let me clarify what I meant. You had code like this before:

  1. #include <iostream.h>

My point was that with Visual C++, you can now leave off the .h and put this:

  1. #include <iostream>

Using Visual Studio, if you wrote your own class called MyClass, you might have a file called "MyClass.h" and if you included that, you'd keep the ".h" when using Visual Studio:

  1. #include "MyClass.h"

If I recall correctly, that wasn't an issue in your last program since there was only one file. Regardless, the modern C++ libraries like iostream wouldn't have the ".h" on them when you use Visual Studio.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,614
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 713
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Comparision Between Tarbo C++, Visual C++

 
0
  #7
Oct 6th, 2008
>What i want is something which wont wait for the user after a fixed time..
Most likely you were trying to do it manually, so something like this should give you ideas:
  1. #include <ctime>
  2. #include <iostream>
  3. #include <string>
  4. #include <conio.h>
  5.  
  6. template <typename T, typename Func>
  7. T timed_input ( Func reader, int seconds )
  8. {
  9. clock_t start = clock();
  10.  
  11. while ( clock() < start + ( seconds * CLOCKS_PER_SEC ) ) {
  12. if ( kbhit() )
  13. return reader();
  14. }
  15.  
  16. return T();
  17. }
  18.  
  19. struct line_reader {
  20. std::string operator()()
  21. {
  22. std::string s;
  23.  
  24. if ( getline ( std::cin, s ) )
  25. return s;
  26.  
  27. return std::string();
  28. }
  29. };
  30.  
  31. int main()
  32. {
  33. std::cout<<"Enter your name in less than five seconds: ";
  34.  
  35. std::string name = timed_input<std::string> ( line_reader(), 5 );
  36.  
  37. if ( name.empty() )
  38. std::cout<<"\nTime's up\n";
  39. else
  40. std::cout<<"You entered \""<< name <<"\"\n";
  41. }
This is actually more user friendly than straight raw input, because once a key is pressed, the program will start blocking for input. This gives the user as much time as necessary after the first keypress to finish typing. If you don't want that, a combination of kbhit and getch can be used to time the entire process, but you also have to do more work in error handling.

>My point was that with Visual C++, you can now leave off the .h and put this
Actually, you have no choice. Current versions of Visual C++ won't accept old-style C++ headers.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC