| | |
Comparision Between Tarbo C++, Visual C++
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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??
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??
>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.
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.
New members chased away this month: 5
•
•
Join Date: Mar 2008
Posts: 89
Reputation:
Solved Threads: 2
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.

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
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
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
•
•
Join Date: Jan 2008
Posts: 3,844
Reputation:
Solved Threads: 503
•
•
•
•
".H" could be avoided,right? any other other changes required??
C++ Syntax (Toggle Plain Text)
#include <iostream.h>
My point was that with Visual C++, you can now leave off the .h and put this:
C++ Syntax (Toggle Plain Text)
#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:
C++ Syntax (Toggle Plain Text)
#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.
>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:
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.
Most likely you were trying to do it manually, so something like this should give you ideas:
C++ Syntax (Toggle Plain Text)
#include <ctime> #include <iostream> #include <string> #include <conio.h> template <typename T, typename Func> T timed_input ( Func reader, int seconds ) { clock_t start = clock(); while ( clock() < start + ( seconds * CLOCKS_PER_SEC ) ) { if ( kbhit() ) return reader(); } return T(); } struct line_reader { std::string operator()() { std::string s; if ( getline ( std::cin, s ) ) return s; return std::string(); } }; int main() { std::cout<<"Enter your name in less than five seconds: "; std::string name = timed_input<std::string> ( line_reader(), 5 ); if ( name.empty() ) std::cout<<"\nTime's up\n"; else std::cout<<"You entered \""<< name <<"\"\n"; }
>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.
New members chased away this month: 5
![]() |
Other Threads in the C++ Forum
- Previous Thread: Trouble with loops - Calculate sum of even and odd integers
- Next Thread: *this problem (help?)
Views: 736 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets







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..