Saturday, May 22, 2010

How do I save a visual C++ file on unix is there a command especially for visual C++ type programs?

Save a c++ file on unix....





Well, this is what I do:





~$emacs filename.cpp -nw





once in emacs, you create your program. To save it, hold down ctrl and press x - s. Then just hold ctrl and press x - c to exit.





then do a ls -l from the command line and you will see your file there.





or you could just create the file by typing this:





~$touch filename.cpp





then type ls -l and u will see the file and you can use the text editor of your choice.


In visual c++ 9.0 express eddition...?

when i build my project and try to run the executable on another computer it says "program configuration not correct, reinstalling the application might help" are there more files that i need to have for the program to work, aswell as the executable? if so what are these files and where are they located? if not please tell me what I'm doing wrong?


thanx :P

In visual c++ 9.0 express eddition...?
Depending on what you used for your program, there may be lots of files that you need to copy over including your exe. These will depend on special dll's, ActiveX components, MFC libs, etc.





If you have a sorta' plain program that uses MFC, try going into the config manager and set the build option for "statically linked MFC." This will embed the MFC lib that you used to build your program with the exe. (No need to copy over the "right" MFC library).





Note: I use the full blown VS 6,7,8 versions and am not familiar with the express versions of VS. Hope this helps.
Reply:Yeh what you do is that you pet it a bit, give your project some cookies and then hopefully it will be loyal and hopefully compile so that it will work on another PC. Hope this helped.


Microsoft visual c++?

whenever I type in a code and debug it, as soon as I hit enter the black screen disappears instantly, without me seeing the final solution. for example:





#include %26lt;stdio.h%26gt;


#include %26lt;stdlib.h%26gt;


#include %26lt;math.h%26gt;


int main()


{


/* Part A) Declare and initialize variables. */


double b, h, area;


/* get the height and base values from the keyboard*/


printf("Enter the base length of the triangle :");


scanf("%lf",%26amp;b);


printf("Enter the height of the triangle :");


scanf("%lf",%26amp;h);


/*calculate the area of the triangle */


area = .5*b*h;


printf("Area = %lf \n", area);


}





when i type in the values, the screen disappears, is there anyway I can keep the black screen up until I want to close it, instead of it closing automatically?

Microsoft visual c++?
quick answer, add a line at the end of the program asking for input. Such as:





cin%26gt; x;





This will force the screen to stay open until it receices a response from you.





-Greg
Reply:the way i do it for my console based programs is to use system("PAUSE");





so in your code it will be:


#include %26lt;stdio.h%26gt;


#include %26lt;stdlib.h%26gt;


#include %26lt;math.h%26gt;


int main()


{


/* Part A) Declare and initialize variables. */


double b, h, area;


/* get the height and base values from the keyboard*/


printf("Enter the base length of the triangle :");


scanf("%lf",%26amp;b);


printf("Enter the height of the triangle :");


scanf("%lf",%26amp;h);


/*calculate the area of the triangle */


area = .5*b*h;


printf("Area = %lf \n", area);





system("PAUSE"); //creates a system pause


}





What this does is output the "Press any key to continue" prompt (to which you press enter to continue). You don't need to include anything (although why not put "using namespace std;" after your #include directives?).





NOTE: This command ("system("PAUSE")") will make your console proggy only work on Windows machines!
Reply:You say you are trying to debug it, but are you using the debugger?





Instead of running the program, select Debug-%26gt;Start Debug (or you can just push F5).





Once your application starts, click in the left margin to set a breakpoint. When your code execution gets to the breakpoint, the code will stop executing, and you can examine all of your variables.





You will see that your application works, it is just completing before you can see the results. Therefore, you probably want to do what Greg et al recommend about adding another scanf().





Sorry if this sounds overly simple. I'm not meaning to be condescending, especially if you already ran through the debugger. The problem is that most students never learn to use the debugger and only use printf statements. I've just spent an awful lot of time retraining young programmers to use debuggers and other productivity tools. The sooner you learn, the easier it will be for you.
Reply:You should make the project type as Cmd line type project. Then you can run it from command line and see the output.
Reply:I dumped Windoze a long time ago but I seem to remember that system("pause"); works. System is a--cstlib I believe -- routine which calls an outside program. Pause is an MS-DOS program which prints "Press Any Key" on the screen and waits till you do to exit.


Install Visual C++ without admin privlege... is it possible?

I'm working on a game for my senior project and I want to work on it at school. However, admin priveleges prevent me from installing the program. I asked our network guy at the school and told me to use some special computer in a different room. The only problem is I wanted to work on it whereever I go if there is a program out there that will allow me to do so that would be great... I know if I rebooted to a new OS it would work but don't feel like reformatting... any answers are fine and plse don't send stuff : OMG YOU SHOULDN'T DO THAT TO THE SCHOOL'S comp... I understand the risk thanks

Install Visual C++ without admin privlege... is it possible?
No. You need admin privileges to make the registry changes. Plus the school probably uses software that will wipe out any changes, which will result in disciplinary action against you and you not getting C++ installed anyway.

primrose

Microsoft Visual C++?

Can anyone help me with something? I bought a new program, Xara Menu Maker 1.1 and when i try to run it, i get a Runtime error. . . Here's a screen shot: http://www.jeremymedlock.com/Untitled.jp...

Microsoft Visual C++?
Was this program made to Run on Vista....


You might need to tell the program to try to run it like it is on XP. (right click the program icon, and go to the properties).





The error just means something happen in the program and its trying to close its self down (instead of just freezing), but as we can see even closing itself down isn't doing that correctly. I'm guessing the program wasn't made for Vista.
Reply:Have you tried uninstalling it and reinstalling it?


Microsoft visual C++ version 6.0?

Hello,








I want to download this program if you know any website for downloading this program post it here





thank you

Microsoft visual C++ version 6.0?
It will probably be hard to find an old version by now, but, if you want, they have an express release of the latest version.





http://www.microsoft.com/express/vc/


With Visual C++...?

#include%26lt;AUDIOENG.h%26gt;





Under header files, I have:


AUDIOENG.h





When I build the file, I get the error C1083, or:


Can't open AUDIOENG.h because no file exists.





Huh? Help please?





The header isn't blank, it's worked before, and the spelling is correct.

With Visual C++...?
Add the path of your header file to the "include directories" list. Preferably as a relative path from the project dir.
Reply:If you have the file in the local directory, use quotes (") instead of brackets (%26lt;%26gt;). This will tell the compiler to look in the local directory instead.
Reply:verify that your include directory settings point to the location of that file.