LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-14-2011, 03:34 PM   #1
joham34
Member
 
Registered: Oct 2009
Location: Greece
Distribution: ubuntu 14.04
Posts: 75

Rep: Reputation: 3
is a visual C++ tutorial good for a linux user?


Hello everybody.
I plan to start reading about C++ and a friend of mine gave me printed the tutorial "Visual C++ in 21 days"
I use Linux exclusively and would like to use C++ to make some programs for personal use.
So I wonder : Is this book proper for me ( since Visual C++ is developed by MS and I am a Linux user ) or should I print another tutorial ?
Thanks in advance

Last edited by joham34; 09-14-2011 at 10:14 PM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-14-2011, 05:16 PM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
You should avoid all IDE-oriented C and C++ introductory tutorials. They'll be counter-productive in Linux, even if the IDE is available in Linux. You need to have a good understanding of the build process from the command line and from the makefile system to be a successful C/C++ programmer in Linux.
Kevin Barry
 
2 members found this post helpful.
Old 09-14-2011, 05:35 PM   #3
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Hi,

there are several C++ tutorials in the internet, vor example this one: click here so there is no need for a M$-book
You may search with google. It is a good idea to find some exercises with solutions or start a small project, because only the theory will not help much. You will also find exercises in the internet click here.
Maybe this is a little bit off topic in this thread, but I have learned much at project euler http://projecteuler.net/index.php?section=about

Markus
 
2 members found this post helpful.
Old 09-14-2011, 10:10 PM   #4
joham34
Member
 
Registered: Oct 2009
Location: Greece
Distribution: ubuntu 14.04
Posts: 75

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by markush View Post
Hi,

there are several C++ tutorials in the internet, vor example this one: click here so there is no need for a M$-book
You may search with google. It is a good idea to find some exercises with solutions or start a small project, because only the theory will not help much. You will also find exercises in the internet click here.
Maybe this is a little bit off topic in this thread, but I have learned much at project euler http://projecteuler.net/index.php?section=about

Markus
Thank you for your answer. Ill do as you suggested. I already downloaded the tutorial you suggested. I consider my question is answered and marked thread as solved.
One last question. Say you write a C++ program in a Linux machine and you want later to run it in a Windows machine. Will you have to change the source code or since you can compile it with g++; you can compile it with a Windows compiler without changes?

Last edited by joham34; 09-14-2011 at 10:11 PM.
 
Old 09-15-2011, 01:33 AM   #5
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Quote:
Originally Posted by joham34 View Post
One last question. Say you write a C++ program in a Linux machine and you want later to run it in a Windows machine. Will you have to change the source code or since you can compile it with g++; you can compile it with a Windows compiler without changes?
That depends on the functions you use. If you're program uses systemspecific functions you'll very likely have to adapt the sourcecode when you want to compile it on another system.
But for most of the beginner-exercises this is not necessary.

You may take a look at the C++ (or C respectively) Standard-library. I'd assume that this functions are independent of the Operatingsystem (for the user/programmer, internally they are of course different for Windows and Linux).

Markus
 
3 members found this post helpful.
Old 09-15-2011, 04:30 PM   #6
merlinblack
LQ Newbie
 
Registered: Dec 2007
Location: Sydney, Australia
Distribution: Ubuntu, Ubuntu Server, Linux From Scratch, Fedora, Mac OSX, and Windows sometimes.
Posts: 20

Rep: Reputation: 0
That Visual C++ in 21 days is most likely fine for learning C++ on Linux. If it is any good, the IDE stuff will be kept to a minimum, and the rest should be by nature of being introductory, cross platform.

Also a good way to learn is too set yourself a task to complete. If your new to programming perhaps a simple 'guess the number, saying warmer or colder' game.

I've been programming for years, so I get up to speed on a new language by making a program to solve Sudoku puzzles.

Happy coding!
 
Old 09-15-2011, 04:53 PM   #7
bobclemmons
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 1
Brucek Eckel has a great book available free online for learning c++ and having example programs that can be built using gcc or in Windows.

http://www.mindview.net/Books/TICPP/...ngInCPP2e.html
 
1 members found this post helpful.
Old 09-15-2011, 09:41 PM   #8
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.0
Posts: 524
Blog Entries: 2

Rep: Reputation: 68
Quote:
Originally Posted by merlinblack View Post
I've been programming for years, so I get up to speed on a new language by making a program to solve Sudoku puzzles.
You too?

I would love to compare algorithms.
 
Old 09-15-2011, 10:57 PM   #9
area124
LQ Newbie
 
Registered: Jun 2009
Location: Illinois
Distribution: Ubuntu
Posts: 2

Rep: Reputation: 1
A good C++ book

My favorite text is "C++ How to Program" by Deitel & Deitel. I think I must have at lease two editions on my shelf. I is a very good reference as well as teaching text. The only downside is it is a little pricey.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OSPF Simulation Tutorial for Beginners (Interactive, Visual) vl1111 Linux - Networking 1 02-25-2011 04:08 PM
Good Tutorial on Linux Internals linuxunix Linux - Newbie 5 03-06-2010 10:24 AM
Tutorial neede for VIsual Programming on Linux (having knowledge of Text based C/C++) dhirsolo Programming 3 08-02-2006 01:05 PM
Good Linux Tutorial for a windows user? FreeFromXP Linux - Newbie 7 07-29-2004 05:03 PM
Good C++ tutorial which works for linux? shadow.blue Programming 7 03-15-2004 11:07 PM


All times are GMT -5. The time now is 04:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration