NewBie with a question or two

Hello. I have recently downloaded a "Turbo C++ program" from the internet.

But I am wanting to simply learn the C++ programming language.

Can I ask questions here about using 'this' program?

Thanks for your response(s)
Bye
SC

P.S. When learning something..I think you need to learn how to crawl before you can walk or run. Right now I would like to learn how to crawl first. Any suggestions on how I could start?


Hi,

The trouble with Turbo C++ is that it is ancient: there are much better options out there. I would seriously consider getting rid of it, unless you are in India and require it for exams.

For compilers, here are a few :

clang from llvm http://llvm.org/ - arguably one of the best of the free ones, IMO
gcc https://gcc.gnu.org/ - still pretty good, clang is better though- a beginner wouldn't notice the difference
Microsoft compiler that comes with Visual Studio - others can talk about this one, I am a Linux guy

For IDE's (Integrated Development Environment) there are lots, here are just a few

QtCreator - Lots of stuff to learn in here, The Qt Framework
CodeBlocks
Eclipse
Visual Studio - there are free Community Editions

All these compilers (Except VS) and IDE's work on either Windows or Linux. It's possible to get various compilers to work with various IDE's - Except MS compiler - it's tied to VS. VS can use clang though.

Any suggestions on how I could start?


Have a look at the tutorial, reference material and articles at the top left of this page.

Good Luck !!
Thanks for the response. I am wanting to learn the c++ language. Could you tell me exactly what and where on the internet I can download it?

How about MS Visual express 2010? Hmm..somebody mentioned that's not really the programming language. Basically what and where can I find that which I am supposed to download?

Thanks for any and all responses
Bye
SC
Download Visual Studio (current version, free) from:
https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx

Note:
In Visual Studio 2015, Visual C++ is not installed by default. When installing, be sure to choose Custom installation and then choose the C++ components you require. Or, if Visual Studio is already installed, choose File | New | Project | C++ and you will be prompted to install the necessary components.
https://msdn.microsoft.com/en-us/library/60k1461a.aspx



And/or download the command line MinGW/GNU compiler/toolchain from:
either http://nuwen.net/mingw.html
or http://tdm-gcc.tdragon.net/ (favour the TDM64 bundle)
Hello. Just like to say that I am completely lost when it comes to using these suggestions.

I am a big fan of ....command line prompts....hmm...is there anything that I can start with there?

Thx
SC
> I am a big fan of ....command line prompts....hmm...is there anything that I can start with there?

download the command line MinGW/GNU compiler/toolchain from: http://nuwen.net/mingw.html

Run open_distro_window.bat (in the directory where you installed MinGW) to open a command window.

On the command line, cd to the directory containing the source file (myprogram.cpp in the example below) and type:
g++ -std=c++14 -Wall -Wextra -pedantic-errors myprogram.cpp && .\a.exe
to compile, link and run the program.
Hello. Sorry I opened the window..but 'it' cannot find the 'myprogram.cpp..a..directory or file.

Sorry..could I have by 'accident' not fully loaded the compiler onto my computer?
Should this directory for sure be showing up.

I also cannot set distro paths.bat at all. There does seem to be a directory for it

Thx
SC
Last edited on
> I opened the window.. but 'it' cannot find the 'myprogram.cpp..a..directory or file.

'myprogram.cpp' was just an example; for the file containing the C++ program that you write.

In the window that you opened with open_distro_window.bat, type
g++ --version

If the compiler is installed correctly, you would see something like:
g++ (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Apparently the compiler is not installed correctly. I can't do anything in the command prompt windows I am seeing. Hmm....what to do.

I am completely new to this..but once I am able to 'crawl' then walk..that will be the good part. Now..how to correctly find and download 'a' compiler. Hmm...

The command line window say's this g++--version is not a reconzied command or batch file
SC
Last edited on
Get to the directory where you installed Nuwen MinGW
In that directory, you should see the file open_distro_window.bat
Run it to open a comand window, and in that type: g++ --version
I am going to try and re-install this thing. I have done what you said already..but does not work with what I have. Sad part is ..I would like to get rid of what I have but having trouble deleting it. That's okay.. I am going to work 'around' it by trying to get a proper download happening.

Thanks for responding by the way

Bye
SC
I tried what you said..does not work. Hmm
Hello. Well..I am not sure what I did in the past..but I have been successful! Hmm...

It's very important to put a "space" after the g++ then the expression --version!! Hmm..thot I did that before.

Now..where do I begin?

SC
> Now..where do I begin?

Get a good book (or two)
For instance: 'Programming: Principles and Practice Using C++ (2nd Edition)' by Bjarne Stroustrup

There are more book suggestions here: https://isocpp.org/get-started

The only way to learn a new programming language is by writing programs in it. The first
program to write is the same for all languages: Print the words hello, world

This is a big hurdle; to leap over it you have to be able to create the program text somewhere,
compile it successfully, load it, run it, and find out where your output went. With these
mechanical details mastered, everything else is comparatively easy.

In C++, the program to print "hello, world'' is

1
2
3
4
5
6
#include <iostream>

int main()
{
    std::cout << "hello, world\n" ;
}


Just how to run this program depends on the system you are using.

- adapted from: 'The C Programming Language (second edition)' by Kernighan and Ritchie


In your case, we have already discussed how to run this program.
Assuming that the program text has been saved into a file called myprogram.cpp, follow the steps outlined in:
http://www.cplusplus.com/forum/general/190566/#msg921508
Last edited on
Hello. When I type that stuff in the open MinG window the prompt says my doing that is illegitimate..won't work.

I am thinking about how to get over the 'hurdle'.

By the way..how exactly do you do that? The prompt is not allowing me to do anything..it's like it will only run or execute 'programs'.....batch files.....

SC
Also, a code blocks program I have says it can't find the set path for GNU compiler..yet at the same time..all of that should have been downloaded with the code blocks download.............


Bye
SC
> When I type that stuff in the open MinG window

What stuff did you type in?


> Also, a code blocks program I have says it can't find the set path for GNU compiler

See: http://www.cplusplus.com/forum/beginner/149018/#msg780212
Hello. I am a bit shocked. Something good has happened recently. Basically I went into a Code Blocks for "A 'little' time".

I was 'working' around...and opened a 'project'. As I went on..at the end I got a dark MinG prompt window showing up with the words "Hello World!".

Hmm..don't remember the ! point though.

SC

P.S. Still having a lot of problems understanding the code blocks ide and or working with it as well. By the way..where D I D the exclamation point come from??!!!!!!!!!!!!!!!!
Last edited on
By the way..where D I D the exclamation point come from?

Without seeing the actual code you wrote, we can't possibly know.
I think actually I did it.

SC
Topic archived. No new replies allowed.