473,836 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

learning Modern C++

hai all,

i am standing on a "crossroad to C++". I am here in front of you as i
have a problem. i will be brief. Please do not think: "arnuld is sick",
i am really struggling & doing hard-work to become a Modern C++
Programmer & i am feeling as if i am standing on a crossroad. i am
asking because every time i made a decision on my own, in my past, i
always ran into huge wastage of time, money & effort. that is why i am
posting it here:

--Problem-- as you folks know that i want to learn Modern C++ & in my
country "C++ Primer" 4/e & "Accelerate d C++" are not available & being
a jobless person i dont have money to order anything from abroad. i
have these books on my shelf:

1.) "Thinking in C++" 2/e
2.) "C++ Primer" 3/e
3.) "The C++ Programming Language" by Bjarne Stroustrup
4.) An illegal version of "C++ Primer" 4/e as a .chm file on my
Desktop.

i have these 5 options:

1.) read "C++ Primer 4/e" online: cant be done. with online copies
productivity goes down to 20%. reading "physically " really makes the
difference in understanding & learning the language.

2.) i took print-outs of 2-3-4 chapters of C++ Primer 4/e & read them &
found them excellent, though i took a while to understand. it has 800
pages, for me, it means 1000 pages of print outs from my EPSON
dot-matrix in 8 separate folders. it will be very difficult to learn
this way & what if i want to search for some phrase/ideas in C++, i am
"gone" in this case. i speak from experience, i tried this with
"Practical Common Lisp" & trust me, it was huge time wastage with much
less productivity & output (well, that is why Stroustrup created C++
:-)

3.) read "Bruce Eckel": tried that, he makes heavy-use of C. i dont
know C, i dont want to, i want C++.

4.) read "C++ Primer" 3/e: utterly incomprehensibl e to me.

4.) Learn C first -OOA & D book -C++. an excellent way to confuse
myself as i have found that learning "vectors, strings, new-delete"
1st, makes learning "C character arrays & free-malloc" much easier.
(while the opposite is not true, i tried it 2 months ago)

5.) Go directly with Stroustrup: +ve point is i will learn "Pure C++",
-ve point is i dont have any real-life coding experience, hence i found
it *too* dense & 50% of the times i did not understand what exactly he
was talink about. (but i do know what are variables, functions &
classes + strings, vectors, new delete from C++)

from all of this, i concluded Stroustrup is the only way to go. i just
need to dwell into it. what do you suggest?

thanks for your time

- arnuld
http://arnuld.blogapot.com

Oct 25 '06
78 4226
* arnuld:
>Alf P. Steinbach wrote:
>>1.) why a function returns an /int pointer/ rather than an /int/ ?
That would presumably be because the function stores the pointer
somewhere. Could alternatively be that the function modifies the
pointed to int (which there might be other pointers to). But in this
latter case a reference argument would usually be more appropriate.

did not understand, not even the single 1%.
That might be because I answered a question other than the one you
asked. Mea culpa.

Now, let's see, reading /slowly/: "/returns/ an int pointer".

Oh well, it's not possible to say why some unknown function returns an
int pointer. For any concrete example it might be possible to say.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Oct 30 '06 #61
Victor Bazarov wrote:
Nobody can answer this but you. And nobody knows the future, even
you. What usually happens is you put some effort into learning and
then the time comes to contribute. If you feel strong enough, you
will contribute. If you don't, you won't.
now that is really very *strange* for me but you, Victor, carry a wider
experience of *Life* than me therefore i will follow you here.
It's not the end of the
world if you can't contribute to an open source project.
for me, at least, this is the end. no company giving me a job because i
do not carry any "Project Experience".
Prioritise your goals.
1.) C++ (Stroustrup/Eckel)
2.) OOA & D (Booch, Rumbaugh)
3) IceWeasel, HURD/L4 or something else but definitely the destination
is GNU.
4.) Effective C++, Exceptional C++, Modern C++ Design, Generic
Programming & STL
5.) step 3 & half of 4 will take at least 6 mothst to 1 year.
6.) get a C++ job in my country
7.) apply for an immigration

i only priortised my goals when you asked. before that moment i only
had a vague idea. thanks
As to eligibility, I have no idea. Have you tried asking the project lead (if any)?
yes but 1 year ago when i was complete-100%-newbie to programming. i
wanted to contribute to HURD. when i asked they said at least 2 years
of experience in doing C & since i wa s anovice to programming they
also advised me to learn some "higher-level langugae" first like Scheme
or Python & 2 years project work with C.

i have not made any contact with "IceWeasel" developers but i
downloaded the source-code, it is written in C++.

Oct 30 '06 #62
LR
Noah Roberts wrote:

If it takes you longer than 6 months to learn C++ in its entirety
Is this even a possible goal?
you
may as well just give up and learn Java.
Why? Is it possible to learn Java in six months in its entirety?

I'd say that it's possible to learn a useful subset of either language
in six months. But to learn the entire language?

LR
Oct 30 '06 #63
arnuld wrote:
>Victor Bazarov wrote:
[..]
> It's not the end of the
world if you can't contribute to an open source project.

for me, at least, this is the end. no company giving me a job because
i do not carry any "Project Experience".
Since open source projects are not widely known by commercial companies,
having contributed to any of [potentially very obscure] OS projects may
not give you what you expect. Have you asked if OS projects will be
good enough for a company to consider it "experience "?

As to not getting a job, have you tried talking to a recruiter? They
usually know much more of how to succeed in job seeking.
> Prioritise your goals.

1.) [..book titles redacted..]

We'll call the above "learn enough C++ to get a job". Subgoals are
good to have.
5.) step 3 & half of 4 will take at least 6 mothst to 1 year.
That's not a goal. That's a risk.
6.) get a C++ job in my country
7.) apply for an immigration

i only priortised my goals when you asked. before that moment i only
had a vague idea. thanks
You need to work a bit on those, still. Add risk assessment to your
activity, identify the necessary resources (and the risks of not
finding them), and you're going to learn more about getting a job
than if you just learn C++.
>As to eligibility, I have no idea. Have you tried asking the
project lead (if any)?
[..]
i have not made any contact with "IceWeasel" developers but i
downloaded the source-code, it is written in C++.
The simplest way to start contributing is to get the list of bugs
and try fixing any of them. Once you find a solution, contact any
of the developers on the team and make your suggestion. If it is
accepted, you have contributed.

Good luck!

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Oct 30 '06 #64
Victor Bazarov wrote:
The simplest way to start contributing is to get the list of bugs
and try fixing any of them. Once you find a solution, contact any
of the developers on the team and make your suggestion. If it is
accepted, you have contributed.
ok, i have joined their mailing-list & will post my intentions there.
but still, i am not able to resist & hence ask, i can fix bugs only if
i know C++ which i dont.

Oct 30 '06 #65
"arnuld" <ar*****@gmail. comwrote:
1.) why a function returns an /int pointer/ rather than an /int/ ?
It, of course, depends on the specific function's purpose. However,
generally when a function returns a pointer, the caller is responsible
for lifetime management of the object returned. For example, it is
returning something that was passed into it as a parameter or something
that was created using "new" within the function.
2.) why a function takes arguments as: /const string& s, char c/ rather
than /string s, char *c/ or /string *s, const char *c/ etc. etc. ?
Taking a const reference (i.e., "const string& s") generally has better
performance characteristics than taking a value (i.e., "string s") if
the object is larger than an int.

For chars, "const char*" and "char*" has special meaning as they refer
to c-style strings. Therefor they are generally not used unless one
wants to pass a c-style string.

--
To send me email, put "sheltie" in the subject.
Oct 30 '06 #66
Daniel T. wrote:
1.) why a function returns an /int pointer/ rather than an /int/ ?

It, of course, depends on the specific function's purpose. However,
generally when a function returns a pointer, the caller is responsible
for lifetime management of the object returned. For example, it is
returning something that was passed into it as a parameter or something
that was created using "new" within the function.
now i understood *something*.
2.) why a function takes arguments as: /const string& s, char c/ rather
than /string s, char *c/ or /string *s, const char *c/ etc. etc. ?

Taking a const reference (i.e., "const string& s") generally has better
performance characteristics than taking a value (i.e., "string s") if
the object is larger than an int.

For chars, "const char*" and "char*" has special meaning as they refer
to c-style strings. Therefor they are generally not used unless one
wants to pass a c-style string.
ok, but what is the difference betwen using /int* x/ & /int x/ as an
argument to a function?

why someone should prefer one over the other?
--
To send me email, put "sheltie" in the subject.
Oct 30 '06 #67
"arnuld" <ar*****@gmail. comwrote:
Daniel T. wrote:
1.) why a function returns an /int pointer/ rather than an /int/ ?
It, of course, depends on the specific function's purpose. However,
generally when a function returns a pointer, the caller is responsible
for lifetime management of the object returned. For example, it is
returning something that was passed into it as a parameter or something
that was created using "new" within the function.

now i understood *something*.
2.) why a function takes arguments as: /const string& s, char c/ rather
than /string s, char *c/ or /string *s, const char *c/ etc. etc. ?
Taking a const reference (i.e., "const string& s") generally has better
performance characteristics than taking a value (i.e., "string s") if
the object is larger than an int.

For chars, "const char*" and "char*" has special meaning as they refer
to c-style strings. Therefor they are generally not used unless one
wants to pass a c-style string.

ok, but what is the difference betwen using /int* x/ & /int x/ as an
argument to a function?
Generally, "int* x" refers to an array of ints or it serves as an
indicator that the called function must take responsibility for the
destruction (calling delete on) the object passed in.
why someone should prefer one over the other?
These are primarily minor issues of preference for the programer in
question. If, for example, you now ask between "int* x" and "int& x" for
a single 'x' object, I would have to say, "It depends on the programer."

--
To send me email, put "sheltie" in the subject.
Oct 30 '06 #68
Daniel T. wrote:
ok, but what is the difference betwen using /int* x/ & /int x/ as an
argument to a function?

Generally, "int* x" refers to an array of ints or it serves as an
indicator that the called function must take responsibility for the
destruction (calling delete on) the object passed in.
Ok, you are talking about /arrays/ & /detruction/. so one uses /int*
x/, it means he is using Dynamic-Memory-Allocation instead of Static &
hence faster/efficient use of hardware. right?

/int* x/ refers to /arrays/. what does /int& x/ refers to?
why someone should prefer one over the other?

These are primarily minor issues of preference for the programer in
question. If, for example, you now ask between "int* x" and "int& x" for
a single 'x' object, I would have to say, "It depends on the programer."
it means, ther is no need to fear from them. i always thought they were
*technical* issues.
To send me email, put "sheltie" in the subject.
what is that?

Oct 30 '06 #69
Daniel T. wrote:
[..]
Generally, "int* x" refers to an array of ints or it serves as an
indicator that the called function must take responsibility for the
destruction (calling delete on) the object passed in.
REALLY? <shaking his head in disbelief And I always thought that
it's because the integer needs to be filled in by the called function,
but the argument is essentially "optional". ..
>why someone should prefer one over the other?

These are primarily minor issues of preference for the programer in
question. If, for example, you now ask between "int* x" and "int& x"
for a single 'x' object, I would have to say, "It depends on the
programer."
Damn! And I thought it depended on the task at hand... Damn!
Oct 30 '06 #70

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

Similar topics

3
330
by: kooolega | last post by:
Hi, that's me! I've decided to learn C++, but I'm still thinking about the books about C++. Which one is the best one and so on. I've made a list of books I'm going to read. I'd be glad if you checked it and told me your opinion. So, that's the list: 1. "Thinking in C++. Tom I" by Bruce Eckel 2. "Thinking in C++. Tom II" by Bruce Eckel and Chuck Allison 3. "C++ Unleashed" by Jesse Liberty 4. "C++ Gotchas: Avoiding Common Problems in...
3
2573
by: Sean McCourt | last post by:
Hi I am doing a JavaScript course and learning from the recommed book (JavaScript 3rd Edition by Don Gosslin) Below is one of the exercises from the book. I get this error message when I try to use the calculator. "document.Calculate.Input is null or not an object" Can someone please tell me why this is?
8
1970
by: Mantorok | last post by:
Hi all I'm looking to learn C and/or C++ and I was wondering if there were any good on-line resources and books. I am currently a C# developer but I'm keen to discover C/C++ as I feel it would be a benficial experience. Any suggestions?
4
1822
by: AmateurScripter | last post by:
I'm interested in learning C. What is the best way to learn this language? I know some JavaScript and know HTML very well. I can't afford any programs, but I can get books. What should I do?
26
3678
by: puzzlecracker | last post by:
It'd be interesting to compare the learning practices of c++ practitioners. I'll start with mine The C++ Programming Language C++ Primer Effective C++ More Effective C++ Effective STL The C++ Standard Library : A Tutorial and Reference (most of it) Exceptional C++
14
1659
by: master_programmer | last post by:
Hi I hope that I am posting to the right place. I want to learn programming and am looking at a language too choose. I thought about C++ but my friend told me thats its old fashioned and will be replaced by more modern computer languages like Visual Basic and Cold Fusion. Is it true that not many people use C++ anymore? What is the best language to learn?
3
1461
by: Niv | last post by:
Hi, I will shortly need to learn C or C++ as a high level hardware description language, modelling hardware at a more abstract level than VHDL. (I'm competent at VHDL & semi-competent at Tcl). I've done some minor dabbling in C before, but should I now, assuming I'm starting out afresh, start with C or go straight to C++. Will C give me a good grounding for C++ or add to my (likely) confusion? Regards, Kev P.
0
9818
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9668
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10843
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10589
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9371
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6978
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5648
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3112
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.