473,385 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

want to learn C++

I want to learn C++! does anyone have any advice?

Lee

Jun 21 '07 #1
21 1962
On Jun 21, 4:40 pm, Lee.k...@gmail.com wrote:
I want to learn C++! does anyone have any advice?

Lee
Yes, get started. I personally like accelerated C++.
http://www.amazon.com/Accelerated-C%...2463388&sr=8-1

It would depend on how much experience you have with programming.
Start by learning the compiler do a hello world program. Learn the
basics. A few years ago I was in the beginner mode. It is very
challenging. Take your time experiment. start with the standard
inputs and outputs. Learn the data types learn program flow. Don't
get too caught up with pointers, learn about the standard libraries
especially string and vector. C++ is a strict language but there are
ways to get around the strict rules. Learn the rules first.

Jun 21 '07 #2
JoeC wrote:
On Jun 21, 4:40 pm, Lee.k...@gmail.com wrote:
>I want to learn C++! does anyone have any advice?

Lee

Yes, get started. I personally like accelerated C++.
http://www.amazon.com/Accelerated-C%...2463388&sr=8-1

It would depend on how much experience you have with programming.
Start by learning the compiler do a hello world program. Learn the
basics. A few years ago I was in the beginner mode. It is very
challenging. Take your time experiment. start with the standard
inputs and outputs. Learn the data types learn program flow. Don't
get too caught up with pointers, learn about the standard libraries
especially string and vector. C++ is a strict language but there are
ways to get around the strict rules. Learn the rules first.
Seconded. Also, DO NOT USE VISUAL C++ 6.0!!!!! If you're using
Windows, start with "console" programs, do not use MFC. Avoid
Microsoft-isms (stdafx.h and _TCHAR/_tmain). MinGW is available for
free and is highly Standard compliant (modulo "export"), and so is
Visual Studio 2005 Express, also compliant (assuming /Za. again modulo
"export").
Jun 21 '07 #3
red floyd pisze:
>
Seconded. Also, DO NOT USE VISUAL C++ 6.0!!!!! If you're using
Windows, start with "console" programs, do not use MFC. Avoid
Microsoft-isms (stdafx.h and _TCHAR/_tmain). MinGW is available for
free and is highly Standard compliant (modulo "export"), and so is
Visual Studio 2005 Express, also compliant (assuming /Za. again modulo
"export").
I am also new in C++ programming. I use VC++ 2005 Express and that is
why I want to ask you about additional VC++ compiler/linker settings
which can assure the best ISO C++ standard compatibility because MS
created many self-owned C++ extensions, I don't interested at all.
Jun 22 '07 #4
depends on how much programming experience you have already.
If you have no experience, here is what helped me:
http://math.hws.edu/javanotes/
this is a great tutorial for java. learn that, the skills will
transfer over to c++ and the syntax is very similar. after that, you
can gather the rest from c++ code examples all over the web.

Josh.

Lee.k...@gmail.com wrote:
I want to learn C++! does anyone have any advice?

Lee
Jun 22 '07 #5
Joshua Moore wrote:
>
Lee.k...@gmail.com wrote:
>I want to learn C++! does anyone have any advice?
depends on how much programming experience you have already.
If you have no experience, here is what helped me:
http://math.hws.edu/javanotes/
this is a great tutorial for java. learn that, the skills will
transfer over to c++ and the syntax is very similar. after that, you
can gather the rest from c++ code examples all over the web.
1. Do not top post. See
http://www.parashift.com/c++-faq-lit...t.html#faq-5.4

2. Java skills do not transfer easily to C++. Often what we see here is
people trying to write Java in C++ and making novice mistakes (new-ing
everything, etc..).
Jun 22 '07 #6
>
Seconded. Also, DO NOT USE VISUAL C++ 6.0!!!!! If you're using
Windows, start with "console" programs, do not use MFC. Avoid
Microsoft-isms (stdafx.h and _TCHAR/_tmain). MinGW is available for
free and is highly Standard compliant (modulo "export"), and so is
Visual Studio 2005 Express, also compliant (assuming /Za. again modulo
"export").
Interesting that you say this about msvc++6.0 Right now I'm in the
middle of Prata's C++ Primer Plus. Once done, I intended to work
through this tutorial:

http://www.stromcode.com/wiki/index....Win32_Tutorial

to get some experience of using C++ with the Windows API. The writer
of this tutorial seems to agree with you in that he urges users to
download vs2005. Right now I'm using Dev-Cpp and am somewhat
intimidated about using a different ide/compiler. Is the transition
pretty simple?

Jun 22 '07 #7
On 22 Jun, 02:24, Joshua Moore <joshu...@gmail.comwrote:
Lee.k...@gmail.com wrote:
I want to learn C++! does anyone have any advice?
depends on how much programming experience you have already.
If you have no experience, here is what helped me:http://math.hws.edu/javanotes/
this is a great tutorial for java. learn that, the skills will
transfer over to c++ and the syntax is very similar. after that, you
can gather the rest from c++ code examples all over the web.
Please don't top-post. Thank you. Rearranged.

The OP wants to learn C++. You're the first person I've ever seen
suggest that they way to do that is to learn Java first. I can't
imagine how that can accelerate the process of learning C++. From what
I know of Java and of Java programmers trying to learn C++, I can
however imagine a lot of confusion for the OP if they go that route.

As for code examples on the web, I'm not sure that's a good idea in
general either. By definition, someone learning the language is
incapable of differentiating between the good examples and the awful
examples, and unfortunately there are a lot of the latter. I would
suggest the OP treats any C++ website with caution unless it comes
recommended by a reliable source. I would regard the general consensus
of this group as one reliable source.

To the OP: As well as "Accelerated C++", suggested elsethread, you
might want to look at "Thinking in C++"

http://www.mindview.net/Books/TICPP/...ngInCPP2e.html

I'm not personally familiar with it but it is often recommended in
this group. It's online and free.

Gavin Deane

Jun 22 '07 #8
I'd say it depends on whether you are used to OOP (Object-Oriented
Programming) or not. If you're not, it can be horribly confusing.
Especially once you get into it and you suddenly have pointers flying
everywhere and not understanding when you're copying something and
when you're copying the address.

My suggestion if you don't know OOP, is you learn C#. C# on the very
basic level (before web, multi-threading, databases, etc), is fairly
close to C++. Infact, it's built off of it. I don't mean tinker
long, but long enough to learn how objects work, without having to
worry about the difference between a pointer and a reference. Once
you start to understand OOP (it shouldn't take too long), then
switching is much easier. Then it's just pointer manipulations of
what you've already done.

Obviously, some people will disagree with me. There are a lot of
places to start. Unfortunately, there are a lot of bad ones too.

Jun 22 '07 #9

"Scoots" <bs*******@traxcorp.comwrote in message
news:11**********************@k79g2000hse.googlegr oups.com...
I'd say it depends on whether you are used to OOP (Object-Oriented
Programming) or not.
I'd say it doesn't. C++ is not inherently an 'OOP language'.
It does have built-in support for OOP, but that's only one
of many styles it supports.
If you're not, it can be horribly confusing.
Disagree.
Especially once you get into it and you suddenly have pointers flying
everywhere
(Raw) pointers are rarely needed in C++.
and not understanding when you're copying something and
when you're copying the address.
The copying of objects and how it works does need to be understood,
but imo that's not difficult at all.
>
My suggestion if you don't know OOP, is you learn C#.
C++ != OOP.
C# on the very
basic level (before web, multi-threading, databases, etc), is fairly
close to C++. Infact, it's built off of it. I don't mean tinker
long, but long enough to learn how objects work, without having to
worry about the difference between a pointer and a reference. Once
you start to understand OOP (it shouldn't take too long), then
switching is much easier. Then it's just pointer manipulations of
what you've already done.
Concentrating on pointers in order to learn C++ is imo a mistake.
>
Obviously, some people will disagree with me.
:-)
There are a lot of
places to start. Unfortunately, there are a lot of bad ones too.
Yup.

-Mike

Jun 22 '07 #10

Gavin Deane wrote in message...
<snip>. I would regard the general consensus
of this group as one reliable source.
I'll second that.
>
To the OP: As well as "Accelerated C++", suggested elsethread, you
might want to look at "Thinking in C++"

http://www.mindview.net/Books/TICPP/...ngInCPP2e.html

I'm not personally familiar with it but it is often recommended in
this group. It's online and free.
Gavin Deane
Then why have you not DLed it/them?!? <G>

Add:

TiCpp has two volumes, and is available to *buy* in hardcopy form (Mr. Eckel
deserves to be paid for his work.), the 'online' version is free *and legal*
(not a rip-off like some sites have).

--
Bob R
POVrookie
Jun 22 '07 #11
'Obviously, some people will disagree with me.'

*Cough* ;-)

'C++ !=OOP'
--This is true. Depends on the application though. Object Oriented
Programming will almost 100% be required of you at some point. C++
doesn't make it all that friendly.

'pointers are rarely needed in C++. '
--Again, application dependant. What I'm writing right now is VERY
pointer dependant. But if you're learning you're going to want to use
a lot of pointers, because otherwise you really aren't learning C++ to
the extent it can be used.

For me, having learned C# first, c++ was learning a slightly new
syntax, and direct manipulation of pointers. Nothing else.
Fundamentally, c++ is a syntax, it isn't a revolutionary language, and
there are many other languages. For me, C++ WAS learning pointers.
Pointers are ONE of the things that distinguishes C++ as a 'more
powerful' version of it's anscestor, C. The use of pointers and OOP
is a major reason that people want to learn C++, not C. And, well,
true, you can write little programs, and even some larger programs
with c++, but if you do, without ever encountering a pointer, then why
not go write in basic?

To me, learning these fundamentals before the c++ syntax is 'the way
to go'. Learning syntax means nothing to me if I'm just following
tutorials and don't understand the programming concepts, and c++ isn't
the friendliest language around. I'm not promoting replacing c++ or
saying the only difference is pointers, but I've seen entirely too
many people struggle with OOP and pointers that I think learning c++
doesn't start with learning syntax. Instead, I think it begins with
learning to program. And I think that there are better starting
places than simply installing vc++ 6.0. (*twitch*)

That said, it's not like I'm an expert or anything. And if you
already know programming, there is absolutely no benefit in starting
the way I suggest. In which case, ignore my posts. You know, now
that you've read them. ;-)

On Jun 22, 2:23 pm, "Mike Wahler" <mkwah...@mkwahler.netwrote:
"Scoots" <bssalm...@traxcorp.comwrote in message

news:11**********************@k79g2000hse.googlegr oups.com...
I'd say it depends on whether you are used to OOP (Object-Oriented
Programming) or not.

I'd say it doesn't. C++ is not inherently an 'OOP language'.
It does have built-in support for OOP, but that's only one
of many styles it supports.
If you're not, it can be horribly confusing.

Disagree.
Especially once you get into it and you suddenly have pointers flying
everywhere

(Raw) pointers are rarely needed in C++.
and not understanding when you're copying something and
when you're copying the address.

The copying of objects and how it works does need to be understood,
but imo that's not difficult at all.
My suggestion if you don't know OOP, is you learn C#.

C++ != OOP.
C# on the very
basic level (before web, multi-threading, databases, etc), is fairly
close to C++. Infact, it's built off of it. I don't mean tinker
long, but long enough to learn how objects work, without having to
worry about the difference between a pointer and a reference. Once
you start to understand OOP (it shouldn't take too long), then
switching is much easier. Then it's just pointer manipulations of
what you've already done.

Concentrating on pointers in order to learn C++ is imo a mistake.
Obviously, some people will disagree with me.

:-)
There are a lot of
places to start. Unfortunately, there are a lot of bad ones too.

Yup.

-Mike

Jun 22 '07 #12

Scoots wrote in message...
>
My suggestion if you don't know OOP, is you learn C#.
What Mike said!!

Where the hell is 'C#' for GNU/Linux?

--
Bob R
POVrookie
Jun 22 '07 #13
BobR <re***********@worldnet.att.netwrote:
Where the hell is 'C#' for GNU/Linux?
http://www.mono-project.com/
But now this is drifting OT.

--
Marcus Kwok
Replace 'invalid' with 'net' to reply
Jun 22 '07 #14
On 2007-06-22, Scoots <bs*******@traxcorp.comwrote:
On Jun 22, 2:23 pm, "Mike Wahler" <mkwah...@mkwahler.netwrote:
'pointers are rarely needed in C++. '
--Again, application dependant. What I'm writing right now is VERY
pointer dependant. But if you're learning you're going to want to use
a lot of pointers, because otherwise you really aren't learning C++ to
the extent it can be used.
I suggest you go look again at the context - it was qualified with
'(Raw)'. If you're doing Java-esque OOP in C++, a common practice is to
use a smart pointer, such as Boost's shared_ptr or some other smart
pointer to facilitate some forms of automatic memory management (my
application uses a reference-counting smart pointer and a
weak-referencing counterpart extensively). Such a thing winds up being
extremely similar to object references in other languages (e.g. Java,
and I believe also C#, although I do not know C# myself).

In modern C++ usage, it is considered best to use some kind of a smart
pointer instead of a bare/raw/bald pointer whenever feasible.
Therefore, raw pointers are rarely needed in (modern/standard) C++.

- Michael

--
Confused by the strange attachments? I cryptographically sign my
messages. Search Google for PGP for details.
Jun 22 '07 #15

Scoots wrote in message...
'Obviously, some people will disagree with me.'

*Cough* ;-)

'C++ !=OOP'
--This is true. Depends on the application though. Object Oriented
Programming will almost 100% be required of you at some point. C++
doesn't make it all that friendly.

'pointers are rarely needed in C++. '
--Again, application dependant. What I'm writing right now is VERY
pointer dependant. But if you're learning you're going to want to use
a lot of pointers, because otherwise you really aren't learning C++ to
the extent it can be used.
WHOA, dude! You really, really need to go sit on the toilet for a long
while!

.... and, DO NOT Top-Post.

What the hell are you responding to?

If you want to discuss 'C#', then go to a 'C#' NG.

--
Bob R
POVrookie
Jun 23 '07 #16
On Fri, 22 Jun 2007 12:38:43 -0700, Scoots <bs*******@traxcorp.comwrote:
....
For me, having learned C# first, c++ was learning a slightly new
syntax, and direct manipulation of pointers. Nothing else.
I am pretty sure that this means you have not learned C++ yet.
Although I don't know C#, I am certain that the difference is more
than syntax and pointers, for non-trivial tasks.

The positive aspect of that is, I guess, that both languages have a
reason to exist.
Pointers are ONE of the things that distinguishes C++ as a 'more
powerful' version of it's anscestor, C. The use of pointers and OOP
is a major reason that people want to learn C++, not C.
Here you lost me. C has pointers, and always had them. A typical C
program uses way more pointers than a typical C++ program, and in
much more problematic ways.
And, well,
true, you can write little programs, and even some larger programs
with c++, but if you do, without ever encountering a pointer, then why
not go write in basic?
Because pointers is not what defines the difference between C++ and
BASIC?
And I think that there are better starting
places than simply installing vc++ 6.0. (*twitch*)
Finally something most people can agree on ;-)

To summarize my point of view: if you want to learn C++, learn C++ [0].
Not C, or C#, or Java, or BASIC.

Learning other languages too is fine, but don't expect them to be
deeply similar to C++ just because they use curly brackets. Most
importantly, don't expect the best solution to a problem to always be
similar between languages, just because they are object-oriented.

/Jorgen

[0] That's what Stroustrup always says, too; see his FAQ. But then he
would, wouldn't he?

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org R'lyeh wgah'nagl fhtagn!
Jun 24 '07 #17
Go to this link nice online tutoring given by him. try it out
http://www.learnersparadise.com/ment...ogramming-in-C

Jun 25 '07 #18
On 25 Jun, 13:30, abhay <abhaybigb...@gmail.comwrote:
Go to this link nice online tutoring given by him. try it out
<snip>

Given by him or given by you? If you are recommending you own
services, particularly where money might be involved, you should make
that clear so that everyone is aware of the potential conflict of
interest. If you are recommending the services of someone else who
just happens to share your name, then that's fine.

However, more fundamentally than all that, this newsgroup is about C++
and this thread is about learning C++. You posted a link to a C
tutorial. Why did you think that would help?

Gavin Deane

Jun 25 '07 #19
It's obvious that my posts have been misinterpretted to be some sort
of arguement for C#, c++ and pointers. I think the main point of my
posts has been summarily lost, but to respond to your points and try
to argue my main point again would just drag this further off-topic
than it already is (though if you wish to know it, try reading my last
two paragraphs on that post instead of just picking apart the top
one). The comment on pointers was just a response that they were much
more apparent in c++ coding than they are in java or C#, where they
are largely transparent to a novice user. (by which I mean one new to
programming)

However, I think I'm managing to drag this more off-topic than on, so
I'll just say I was agreeing with JoeC, and trying to provide
suggestions on how to do just that. Not start discussions on bowel
movements or my experience in c++, however indirectly.

Cheers,
~Scoots

Jun 25 '07 #20

Scoots wrote in message...
>
However, I think I'm managing to drag this more off-topic than on, so
I'll just say I was agreeing with JoeC, and trying to provide
suggestions on how to do just that. Not start discussions on bowel
movements or my experience in c++, however indirectly.
Then I must apologize. I'm sorry.

--
Bob R
POVrookie
Jun 25 '07 #21
On Mon, 25 Jun 2007 06:46:03 -0700, Scoots <bs*******@traxcorp.comwrote:
It's obvious that my posts have been misinterpretted to be some sort
of arguement for C#, c++ and pointers.
Well, you /did/ write a lot about that, and nothing prevents me or
anyone else from commenting on it. Especially when correcting obvious
factual errors (like the absence of pointers in C).
I think the main point of my
posts has been summarily lost, but to respond to your points and try
to argue my main point again would just drag this further off-topic
than it already is
I don't think any of this is too offtopic yet.
(though if you wish to know it, try reading my last
two paragraphs on that post instead of just picking apart the top
one).
I assume you mean <11**********************@i13g2000prf.googlegroups .com>
and the part that starts:

"To me, learning these fundamentals before the c++ syntax is 'the
way to go'."

My response didn't quote that part, but it addressed it: "if you want
to learn C++, do not learn another language". To be fair, I didn't
motivate that answer.

regards,
/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org R'lyeh wgah'nagl fhtagn!
Jun 26 '07 #22

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Aziz McTang | last post by:
Hi Group, I am not an experienced programmer at all. I've learned html and css well enough to hand-write simple websites. I'm now looking to move to the next step. Initially, I'd like to do 3...
5
by: mr.iali | last post by:
Hi Everyone I would like to get into software developent using a programming language like c++, java or pl/sql for oracle. I have no idea where to start from. Which language is there more...
9
by: Eric | last post by:
I have a few questions: 1. Should I learn C first or VB? 2. Should I get a book or learn from websites? 3. What book or which website is best? 4. Or should I take a course?
182
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
89
by: Homer J Simpson | last post by:
I am coming to the conclusion that Microsoft doesn't want you to use VB ..Net, based on my experiences. I've downloaded the Express version and signed up for various support options etc. At every...
6
by: damod.php | last post by:
hai , friends, am new one to this group, I want to know About frame works in php Which one is best i want learn any one frame work can you help me Am workin in PHP MY SQL i want to learn it....
2
by: harpreetsingh911 | last post by:
i am student of MCA. i want to know what things are needed to be a efficient programmer in c and c++.
1
Xx r3negade
by: Xx r3negade | last post by:
Just to do something different, I want to learn a functional language such as scheme, common lisp, haskell, or F#. Popularity, usefulness, or easy of use are not important. Which one do you...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.