Borland C++ vs. Visual C++
Hi, Im in a Computer Science class and we use Borland C++ Builder 5.0, we are learning console applications and basic staff like loops, functions, structures, etc... But when I go home and try stuff like I did in Borland it doesnt work (at home I have VC++ 6.0 Standard). For example in Borland I declare...
string Name="Thomas";
but in VC++ I cant do that. Also in Borland I do
#include
then use the gotoxy() function like gotoxy(1,1);
but at home I include the same header and use the same function but it wont work. And yes I know I have the conio.h header in the include directory.
So can anyone help in in these probibly very simple problems?
Thanks
MSN Messenger: Thomas_Szafran@hotmail.com
gotoxy is *not* declared in Visual C++'s conio.h header file, but it is in Borland's. So, it's not through any error of yours, only the actual function is not declared in the header shipped with Visual C++.
As for the other problem, I'm not sure about whether I'm right, but I believe you have a problem with
string Name="Thomas";
because string is a member of the Standard Template Library. I'm not so sure about how to use string, maybe someone else can help you there .
Hope I was of some help !
Edited by - DarkAvenger on November 8, 2001 11:39:26 PM
As for the other problem, I'm not sure about whether I'm right, but I believe you have a problem with
string Name="Thomas";
because string is a member of the Standard Template Library. I'm not so sure about how to use string, maybe someone else can help you there .
Hope I was of some help !
Edited by - DarkAvenger on November 8, 2001 11:39:26 PM
#include <string>using namespace std;int main(int argc, char* argv[]){ string name = "Thomas"; return 0;}
Works for me ...
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
That string example above didnt not work with me, weird. Also were would I be able to find the Microsoft version of Borlands gotoXY function (if possible)?
MSN Messenger: Thomas_Szafran@hotmail.com
Try this:
[Resist Windows XP''s Invasive Production Activation Technology!]
void gotoxy(int x, int y) { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); COORD Pos = { x, y }; SetConsoleCursorPosition(hConsole, Pos);}
[Resist Windows XP''s Invasive Production Activation Technology!]
Download the free Borland C++ compiler and use only Borland C++. It is much better. Or download Delphi 6 or Kylix 2
Amresh
ramresh@dsqsoft.com
Amresh
ramresh@dsqsoft.com
dArkteMplaR of Delphi
I think your school should buy VS 7.0, with Product Activation it will rock!
Kneelz
Kneelz
To the best of my knowledge, no product activation scheme is planned for VS.NET(VS 7.0)
"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - - Stephen Roberts
"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - - Stephen Roberts
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
quote: Original post by Arild Fines
"I contend that we are both atheists. I just believe in one fewer god than you do. When you understand why you dismiss all the other possible gods, you will understand why I dismiss yours." - - Stephen Roberts
NICE QUOTE. WHERE IT FROM?
Ambassador: Mr. Bush are you stoned or just really, REALLY dumb?Pres. Bush - I assure you I am not stoned.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement