There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Software Development
Tag Cloud
audio blue screen boot bsod computer cpu crash dell desktop driver drivers dvd error excel external hard drive firefox format freezes freezing hard drive hardware hijackthis internet internet explorer ipod itunes laptop malware mouse network networking outlook 2007 power printer problem ram router screen slow sound trojan upgrade usb virus vista vista 32-bit windows windows xp winxp wireless
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Absolute Beginner C++ Questions


Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
rankbeginner's Avatar
Member with 75 posts.
 
Join Date: Jun 2004
Experience: Beginner to Programming
24-Jun-2004, 01:52 PM #1
Question Absolute Beginner C++ Questions
Hello and thanks in advance...
It will be obvious from my questions that I'm taking a C++
course for the first time, and the only thing I've ever programmed is
my VCR.

I have a Windows computer running XP Pro.

Question 1:
I had thought that I could type the C++ code in a text editor, and
then use a C++ compiler to get an .exe program.

Well, I looked around and I had trouble finding a compiler.
Is this the way it's done, and if yes, what's a good compiler to use?

Question 2:
In order to get something to compile with, I bought an academic
version of Microsoft Visual C++.net
Surprisingly, I couldn't find a compiler in that whole large thing.

This morning I downloaded the MS Visual C++ Toolkit (free from MS
Website).
How is this toolkit used? .. . Running it, it looks like a DOS screen.
At the prompt, do I simply type in the name of the file to be compiled?

Thanks very much!
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
24-Jun-2004, 08:53 PM #2
Use GCC 3.3.3 Mingw from www.mingw.org.

If you don't feel like figuring out how to download and setup everything, you can do STL's distro from www.nuwen.net

http://www.nuwen.net/files/mingw.zip

It has almost everything setup for you.

Still keep your c++ toolkit.

For MS's toolkit use

cl /EHsc file.cpp -o file

cl /? to see what optimizations you can use.

For mingw use

g++ -Wall -W file.cpp -o file

or to get a smaller file size

g++ -Wall -W file.cpp -o file -s && upx -qqq --best file.exe

You do these at the command line.

example hello.cpp

Code:
#include <iostream>
using namespace std;

int main() {
    cout << endl << "Hello World!" << endl;
}
Once hello.exe is created, don't double-click it to load it. Type hello at the command line to load it.
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run

Last edited by Shadow2531 : 24-Jun-2004 10:51 PM.
Nefesis's Avatar
Junior Member with 14 posts.
 
Join Date: Apr 2004
04-Jul-2004, 09:02 PM #3
i realize this has nothing to do with this thread except for the title. my question is: in visual c++ 6.0, how do you recieve the input from an edit box and from there open another dialog. for example, if i were to enter "about" in the edit box, how would i write the code so that it takes my input and decides which dialog to open. wouldn't you use the if statements (i.e.
if (cin == about)
{
dlgAbout.DoModal();
} ) to chose which dialog to open, but how would you get the computer/program to recognize what the input was from the edit box?
Shadow2531's Avatar
Distinguished Member with 2,629 posts.
 
Join Date: Apr 2001
05-Jul-2004, 03:12 AM #4
I don't use Visuall c++ and also don't know if general, but these links may help.

http://msdn.microsoft.com/library/en..._MFC_CEdit.asp

http://msdn.microsoft.com/library/en...windowtext.asp

http://www.google.com/search?q=c%2B%...utf-8&oe=utf-8
__________________
10 ? "a line as the unending horizon"
20 ? "a curve as the rolling hillside"
30 ? "a point as a distant bird"
40 ? "a ray as the rising sun"
run

Last edited by Shadow2531 : 05-Jul-2004 03:19 AM.
dmneoblade's Avatar
Senior Member with 266 posts.
 
Join Date: Apr 2004
Experience: Yes
27-Jul-2004, 02:08 AM #5
If you installed the Microsoft Visual C++ .net program already (big investment), go to your start menu, find something starting with "Microsoft Visual" in your start menu, and click the "infinity symbol" looking icon. This will bring up the IDE (Integrated Development Environment). This lets you make programs easily by
a> Providing a text editor that colors your code
b> Telling you where errors are
c> compling your program
d> etc...

For help on how to do all that, open the program and press F1. And I recommend buying a beginning c++ book (NOT C++ for Dummies) for reference. But, make sure you can understand at least the first few pages of the book before bringing it to the counter.
rankbeginner's Avatar
Member with 75 posts.
 
Join Date: Jun 2004
Experience: Beginner to Programming
27-Jul-2004, 08:09 AM #6
Thanks very much! ... I did just buy the Visual C++ -- I'm a student, and the EDU version costs around 70 bucks. I thought that my computer would explode when loading all those gigabytes, but it survived. ... I will play around with this this week. I would like to find a C++ book that contains annotated examples: the program code, then a line-by-line explanation. --RB
Nefesis's Avatar
Junior Member with 14 posts.
 
Join Date: Apr 2004
27-Jul-2004, 10:21 AM #7
ok, thanks a lot. i will look there. it'l probably answer most of the questions i have in the future.
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:06 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.