![]() | | ||||||||
| | #1 |
| Warrior Member Join Date: May 2009
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
HI, I am a PHP guy. Now I want to learn C++. Anyone guide me to start it...? |
| | |
| | #2 |
| Advanced Warrior Join Date: Mar 2009
Posts: 931
Thanks: 36
Thanked 102 Times in 91 Posts
| |
| | |
| | #3 |
| HyperActive Warrior Join Date: Apr 2009 Location: United Kingdom
Posts: 204
Thanks: 46
Thanked 10 Times in 6 Posts
| |
| | |
| | #4 |
| Warrior Member Join Date: May 2009
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
|
Thanks for all your suggestions. I know how to google for CPP tutorials. But I need few info about
|
| | |
| | #5 | |
| Advanced Warrior Join Date: Mar 2009
Posts: 931
Thanks: 36
Thanked 102 Times in 91 Posts
| Quote:
VC++ is one of the multiple editors available to edit C++. The best editor depends on your goal and preferences. Most windows c++ programmers go with VC++, the express edition being free. On Linux you'll often find people using vim or emacs or IDE's like Eclipse. Tyrus | |
| | |
| | #6 |
| Active Warrior Join Date: Feb 2009
Posts: 46
Thanks: 2
Thanked 1 Time in 1 Post
|
you can try and visit this website Documentationtutorial/ you will surely learn from that site. |
| | |
| | |
| | #7 |
| HyperActive Warrior Join Date: Apr 2009 Location: EU
Posts: 123
Thanks: 8
Thanked 7 Times in 5 Posts
|
Best way to learn programming is from books. If you want to learn eg. VC++, buy a book which covers both Win32 programming and ANSI C++, read it, try examples and write programs For a start I recommend book by Ivor Horton "Beginning VC++" u can find it on Amazon I think.
|
| | |
| | #8 |
| HyperActive Warrior War Room Member Join Date: Nov 2008
Posts: 172
Thanks: 17
Thanked 12 Times in 12 Posts
|
I think learning from books is alot better than online because reading online hurts your eyes after a while. I would just go to the library and check out a book on C++ programming or search amazon for books. A good free editor is Dev-C++. Check out their website at bloodshed (dot) net.
|
| | |
| | #9 |
| Took The Red Pill War Room Member Join Date: Apr 2006 Location: Here and Now
Posts: 374
Thanks: 124
Thanked 106 Times in 64 Posts
|
Going from PHP to C++ is quite a jump. I can recommend O'Reillys "C++ The Core Language" as a good introduction. What are your reasons for wanting to learn C++? If you're looking for a productive, cross-platform framework Nokia's Qt is certainly worth a look. |
| | |
| | #10 |
| Warrior Member War Room Member Join Date: May 2009
Posts: 28
Thanks: 1
Thanked 2 Times in 2 Posts
|
If you do plan on learning C++, learn it in a vendor-neutral form. Qt is a good framework. GNU is standard. VC++ can be a pain. Choose your poison.
|
| | |
| | #11 |
| Warrior Member Join Date: May 2009
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
| |
| | |
| | #12 |
| Advanced Warrior War Room Member Join Date: Mar 2008 Location: London, United Kingdom.
Posts: 902
Thanks: 675
Thanked 89 Times in 79 Posts
|
Have look at this book it has a very visual learning style, it might be too basic for you but it is good for the beginner: Head first C# by andrew stellman good luck madison |
| | |
| | #13 |
| Active Warrior Join Date: Aug 2007 Location: , , .
Posts: 54
Thanks: 0
Thanked 10 Times in 3 Posts
|
If you are referring to simple crawler for crawling other websites, you can develop them using PHP. No need to mess with C++. CURL functions in PHP is actually quite powerful.
|
| | |
| | #14 |
| Warrior Member Join Date: May 2009
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
| Yes, I am very well in PHP & CURL and I have written lot of simple crawlers. But I need something powerful .....
|
| | |
| | #15 |
| Active Warrior Join Date: May 2009
Posts: 40
Thanks: 0
Thanked 2 Times in 2 Posts
|
Well when I was learning C++ I read this book: |
| | |
| | #16 | |
| A Day dreamer Join Date: May 2009 Location: Selangor, Malaysia
Posts: 263
Thanks: 100
Thanked 21 Times in 13 Posts
| Quote:
can advise you better from there | |
| | |
| | #17 |
| The Architect War Room Member Join Date: Jun 2009 Location: Cambridgeshire, UK
Posts: 113
Thanks: 18
Thanked 17 Times in 17 Posts
|
Hello, C++ as a programming language isn't that difficult. But (there's always a but), the complication comes in when you start adding all the classes required to support the operating system. Visual C++ is a classic, again the basic C++ language is supported, but your effort will be in learning to use Microsoft's Foundation Classes (MFC) as it used to be called. Thousands of classes to make Windows work for you. You need to decide the platform you're going to write programs for (don't think you can simply write a Windows C++ application in Visual C++ and have it running on Linux, it just isn't that easy). It's funny, I used to be a C++ programmer by trade, and now I'm learning PHP. Cheers, Lee. |
| | |
| | #18 |
| Active Warrior Join Date: Jun 2009 Location: Kolkata, India
Posts: 55
Thanks: 8
Thanked 0 Times in 0 Posts
|
Do you know all the OOP stuffs...?? did you use that in PHP...?? As far as I know PHP doesn't provide the 100% OOP stryctures,,,(actually not a singlelanguage does that..!!)... anyway if you are new in OOP...then C++ would a real pain... I would recommend "Complete guide to C++"...it's a good one... I think you should first learn the basic of C...then go for C++... |
| | |
| | #19 |
| HyperActive Warrior War Room Member Join Date: May 2009
Posts: 319
Thanks: 36
Thanked 23 Times in 20 Posts
|
As another poster said I would question your choice of language for what you need to. You should choose a language which makes you productive with what it is you need to deliver. C++ is a very hard language to master and few truly do, as Lee mentioned when you add in frameworks it adds even more complexity. For what you need you could easily go down the route of c#. My weapon of choice for over 14 years has been Delphi and that like c++ is compiled and gives me all the power of c++ with all the same low level access but without any of the headaches.
|
| | |
| | #21 |
| Senior Warrior |
Any reason why you wanted to learn c++? Why not Java or c#? If for VC++ GUI development, Flash/Flex, web/JSP, VisualBasic might be better options.
|
|
Thanks, Yaji (Offer to warriors only: Hosting at BEST companies, FREE for a year or 1 cent first month. PM me if interested. 30 or 45 days money back guarantee.) Hypnosis Weight Loss Fun Info about Hypnosis Weight Loss | Cheap Car Insurance Visit Mesothelioma: New Mesothelioma Info Disclosed Cat Dandruff All about Cat Dandruff. A Must-Read for Cat Lovers | |
| | |
| | #22 |
| Active Warrior Join Date: Jun 2009
Posts: 75
Thanks: 0
Thanked 1 Time in 1 Post
|
Try the documents an tutorials at cplusplus.com. Nicely explained tutorials.
|
| | |
| | |
| | #23 |
| Warrior Member War Room Member Join Date: Dec 2008
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
|
I can recommend "Accelerated C++" if you like to learn from books |
| | |
| | |
| | #24 |
| Advanced Warrior War Room Member |
I would definitely recommend the O'reily Head First series of books. I picked up Head First PHP & MySQL and it's excellent!
|
| | |
| | |
| | #25 |
| Warrior Member Join Date: Jun 2009
Posts: 22
Thanks: 0
Thanked 4 Times in 3 Posts
|
I think php to c# is a much easier jump
|
| | |
| | #26 |
| Active Warrior War Room Member Join Date: Jun 2009
Posts: 91
Thanks: 62
Thanked 2 Times in 2 Posts
|
Well If i understood you correctly your learning Cpp to build a crawler well there are many open source projects in java and python wich i think might be easier to learn. Thou i,m not very good at any programming language LoL i learn what i need to. And if your definetly planning on Cpp then i suggest to look into Nvidia's CUDA programming Now thats something that blows my mind every day. like if i have to restore a password form a DB encrypted in MD5 Well a normal dual core processor 3.1Ghz would do about 3000 to 5000 tires per second brute force as a CUDA enabled nvdida 9500 Gforce does way over 62 MILLION tries persecond |
|
Aut viam inveniam aut faciam.
| |
| | |
| | #27 |
| Active Warrior Join Date: May 2006 Location: Jacksonville,Florida , USA.
Posts: 99
Thanks: 6
Thanked 0 Times in 0 Posts
|
Check out Vidual C++ Express, it is free and it is Microsoft. They also offer training which assumes you have no knowledge all the way up to expert status.
|
| | |
| | |
| | #28 |
| Active Warrior Join Date: May 2006 Location: Jacksonville,Florida , USA.
Posts: 99
Thanks: 6
Thanked 0 Times in 0 Posts
|
C# is basically Microsofts version of JAVA
|
| | |
| | |
| | #29 |
| AT gmail DOT com War Room Member Join Date: May 2009 Location: Kent, WA
Posts: 6,951
Blog Entries: 4 Thanks: 1,740
Thanked 5,487 Times in 2,511 Posts
| |
| Donate to the Darklock Liquor Fund Hey; I got nothin' to do today but smile, 'n-da, 'n-da, doo-da, and here I am. | |
| | |
| | #30 |
| Warrior Member Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
Hey, i think you should start with the C and then goes towards C++. |
| | |
| | #31 |
| CoolRyan.com is Now Live! War Room Member Join Date: Nov 2007 Location: Dayton, OH, USA
Posts: 308
Thanks: 35
Thanked 191 Times in 22 Posts
|
A lot of really good advice you've received so far. If you are looking to program on multiple platforms, (such as crawlers for linux), stay away from Visual C++ or the like. You will need to learn it platform independent of a single platform, so you are not tied down to the platform's structure. I was on the exact (I am talking EXACT, PHP to Desktop Applications) same road as you, and got all kinds of conflicting advice from one person to the next. I wanted to develop Iphone Apps, but was restricted by Objective-C's super cryptic language structure and the Iphone's difficult interface in which to develop. I started on Objective-C's Tutorials, but that didn't work. Too difficult. I then went to C#, which is Window's programming language. Too platform dependent, and I couldn't migrate too easily from one to the other. I then decided to try and start from the beginning. I tried C, but it seemed like a waste of time to start at step 0 and move one at a time all the way to step one million ![]() I then went to c++, but all the tutorials used Visual C++ and taught you more how to use their systems vs. the programming language itself. After all that, I was done with all of that garbage. Finally, (here is my advice) I picked up C++ For Dummies, (corny and cliche, i know) but it taught me to code platform independent so I wasn't tied to one structure and it provided me with all the tools to jump in and start programming right away. I had my first app in, (no joke) 10 minutes. I would pick up a copy of C++ For Dummies 2009 Edition and go over to codeblocks.org and download a copy of their FREE software and ROCK AND ROLL dude! I hope this helps. |
| | |
| | |
| | #32 |
| Warrior Member Join Date: Jun 2009
Posts: 12
Thanks: 2
Thanked 0 Times in 0 Posts
|
Writing a crawler is easy in c/c++, its probably the best way, I've written them in PHP and other scripting languages and found c the most flexible way. But c is my language of choice. To download a page as a text file you could use something like the following code This is for windows, Unix is a little different. #include <windows.h> #include <Urlmon.h> bool DOWNLOAD_URL_AS_FILE(char * URL_NAME, char * file_returned){ if(URLDownloadToFile(0,URL_NAME, file_returned, 0, 0)){return false;} return true; } if (DOWNLOAD_URL_AS_FILE("my_web_site.com", "A_TEXT_FILE.txt") == true){ //code here to open A_TEXT_FILE.txt into a string and parse out whatever info you need //maybe hrefs, images, text, whatever } Pm me and maybe I can help provided its not for email addresses or credit card numbers or other shifty stuff. Be sure to throttle the crawler so your not hitting the server to hard, A good crawler should also obey robots.txt and the META tags. |
| Last edited by geofftop; 07-08-2009 at 09:55 AM. Reason: spelling | |
| | |
| | #33 |
| Warrior Member Join Date: May 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
The best editors I think are Visual Studio or Borland C++ Builder. The second one is easier to understand and to use, while the first is more complicated, but at the same time more interesting and has wider posibilities=))))
|
| | |
| | |
| | #34 |
| HyperActive Warrior War Room Member Join Date: May 2009
Posts: 319
Thanks: 36
Thanked 23 Times in 20 Posts
|
IDE wise there isn't alot in it, BCB is more of a RAD tool as you can quickly design your UI and have it produce your wrapper code very quickly, a la Delphi (which Ive used for over 10 years now) Still think its overkill for the task in hand though! |
| Marketing Strategies app now in the app store
| |
| | |
| | #35 |
| Warrior Member Join Date: Mar 2009 Location: The South
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
Tons of good advice above, tho not much perspective among languages. For a web crawler, I would use PHP and a database. PHP is uses much of the "C" language syntax and libraries, so even the library names are the same or similar. Although I have mastered C, I use PHP for its simplicity. C++ is enormously complicated, well beyond C. If you must use C++, the real power will be with the STL or standard template library. The purpose of C++ is to avoid reinventing the wheel behavior. Therefore, there are gobs of libraries (functions) to learn. That's a steep learning curve for a single objective. To understand what C++ demands of you, I recommend reading a few C++ puzzles in "How Not To Program In C++" by Steve Oualline. Just because it compiles without errors and warnings does not mean your program will run as you intended! When programming at this level, always have a standard reference manual handy - something by Plauger, Harbison, Lipmann or Stroustrop. BCB/RAD tools are great if you know C++ but to drill down to the debugger if you don't really understand the language may not help. C++ is intensely object oriented (OO). About ten times more difficult to master than C -- by my yardstick. |
| | |
| | #36 |
| Took The Red Pill War Room Member Join Date: Apr 2006 Location: Here and Now
Posts: 374
Thanks: 124
Thanked 106 Times in 64 Posts
|
I guess we're talking amongst ourselves as seofreaks hasn't been in for over a month. Looks like this a special job and clearly curl or w-get or a mature and fully tested library for php or python simply will not cut the mustard. Many may argue that obviously the best solution in this case is to program a web crawler from scratch using object oriented machine code. Only then can the full power of the target platform be directed to the arduous and bespoke task at hand. I personally disagree and believe it's ludicrous to attempt such a thing at such a low level. It would be much better to use a macro assembler, and leverage all the advantages of writing instructions that a human can almost understand. Also, in order to maintain the mysterious undertones and hidden purpose of this ubercrawler, it's functionality should be broken down and outsourced to five different rentacoders on five different continents, including Antarctica, such that nobody really knows what they are doing and can't meet up for lunch and talk about it over a pint. Sure the integration and debugging might take a while, a few late nights for several months or years, but once it's finished it will be the fastest piece of redundant, unmaintainable spaghetti you ever did see. It will be something very, very special. |
| | |
| | #37 |
| Cool Aussie Join Date: Dec 2007 Location: Perth, Western Australia
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
|
You need to get back to basics and analyse your requirements. I am a C++ programmer with 5 years experience. PHP code is similar but there is so much design work in designing the program in C++ because of the object orientation and structure of the actual files themselves. I couldn't even design a program unless you have first done the requirements. You don't pick the code and then decide to learn it and how you are going to do it because there is no guarantee that it will work. By starting with what you need (the requirements) then you 'derive' and analyse the different languages and what they provide, as well as interaction with databases, and which opearating system they will reside on at the end point. ie windows or linux. You do not touch any code or start any design until after you know what you want. Its no different to building a house, you don't start with a bricklaying lesson if you need an arhitect. So why not hire the architect? Submit a job to GetAFreeLancer and get them to create a requirements document to find out what it is that you want. They will then look at the different sites you need to interact with. Put a job in with your budget in the $30 to $250 dollar bracket and if you don't like whats on offer cancel the job, you dont' have to pick someone if you don't want to. If you have a crawler then do they not provide API information for you to interact with. This will enable a software engineer to analyse what you need to get the job done. If you pay $50 for a requirements document then at least you know whether the job is doable or not. You could then pay a programmer to build the design. Much quicker and easier to get it done elsewhere, by the time you learn C++ and build something one year could have elapsed. I would have thought PHP was powerful enough. I have done some PHP but as I was C++, and used Borland C++ as my interface to C++, then I am not so up with Internet Applications. I created and wrote only desktop applications. Hope that helps. No, I don't do coding from home anymore. I quit when I quit my job 5 months ago. Its nice to be able to read and check code though when I pay for someone to do jobs. :-) Good luck. Denise Software Engineer |
| | |
| | |
| | #38 |
| Warrior Member Join Date: Jun 2009
Posts: 12
Thanks: 2
Thanked 0 Times in 0 Posts
|
"Much quicker and easier to get it done elsewhere, by the time you learn C++ and build something one year could have elapsed. I would have thought PHP was powerful enough. I have done some PHP but as I was C++, and used Borland C++ as my interface to C++, then I am not so up with Internet Applications. I created and wrote only desktop applications. " Good comment, if you don't know the language in the first place there will be a steep learning curve. Well php is kind of like c their are many differences, I would say the similarities are superficial at best. Also you will have to communicate directly with whatever OS your using, so you will need to learn a new compiler, a new language and a new operating system api. As the poster above said contracting out the job may be far easier, but if you have the ability to stick to a project for a while you may find it rewarding but beware its a lot of work. |
| | |
| | #39 |
| High-tech red-neck War Room Member Join Date: Sep 2007 Location: Notre Dame, IN, USA.
Posts: 36
Thanks: 13
Thanked 6 Times in 5 Posts
|
Let me share my answer to the question as asked then wander off into the woods. Maybe I'm old school but if you really want to learn C++ (which is questionable from further posts) I suggest learning good ol' C to get the core syntax down and then adding in the ++ object aspect. Of course, I started with C and my PHP and Perl look a lot like C... Which brings me around to the underlying issue: the problem determines the tool. At the risk of being offensive, I suspect the problem in this case is behind the keyboard. Whether that is true or not the correct tool is the one that gets the job done while maintaining the programmer's virtues of laziness, impatience, and hubris. Don't learn new tools to solve problems the old tools can solve sufficiently well. From the little shared about the original problem I'd use Perl, but my weapon of choice is generally Perl so that is no surprise. Look for the libraries w/in your tool of choice and go from there. Hope that helps (someone since the original poster seems AWOL). |
| | |
| | #40 |
| Warrior Member Join Date: Jul 2009
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
| |
| | |
| | #41 |
| Alter course, Mr. Paris War Room Member Join Date: May 2009 Location: Ireland
Posts: 449
Thanks: 67
Thanked 100 Times in 54 Posts
| On the subject of learning C++ There are some really good open source tools which don't have the learning overhead of the Visual Studio Express environment. Also, the whole GUI thing can take away from understanding the core concepts in C++. It's good to note that a lot of c++ code is not of the visual kind. C++ is used to write code to run servers, write operationg systems, computer netwok software, and game engines. All of which require no gui work at all! As already mentioned earlier Code::Blocks Code::Blocks is a fantastic IDE. For strictly learning C++ you could check out C++ Annotations (C++ Annotations | Get C++ Annotations at SourceForge.net) 'The C++ Annotations poject offers an extensive tutorial about the C++ programming language. It can be used as a textbook for C++ programming courses.' Also, ZinjaI - "a multi platform IDE for programming in C/C++ aimed to be used in classroom for learning C++, with strong emphasis in debugging information as an educational resource". If you want to do web stuff with the power of C++, then you could do worse than try out cppserv : Total Knowledge: CPPSERV It's been around since 2005, with active development, so don't be put off by its low version number. If MS VC++ or C# is your thing, then try sharpdevelop www.sharpdevelop - SharpDevelop @ic#code sharpdevelop is lighter than Visual Studio and easier to work with initially, it also supports VB, Boo and IronPython On a final note, I agree with an earlier post that suggested learning Python or another scripting language as a first 'real' language. However, if you intend to become a 'real' pogrammer, it's definitely worth the effort at some point to learn c or c++. It's just a bit harder to learn C++ first, and with scipting environments it is possible to see the results of your efforts almost immediately. |
| | |
| | #42 |
| Active Warrior Join Date: May 2006 Location: Jacksonville,Florida , USA.
Posts: 99
Thanks: 6
Thanked 0 Times in 0 Posts
|
Regarding platform dependancy Look at Netbeans.org they are a WYSIWYG editor for many languages including Python, JAVA, C#, VB, etc...Plus NetBeans offers some great training in both Video and Text documentation and the forum is highly active
|
| | |
| | |
| | #43 |
| HyperActive Warrior War Room Member Join Date: Jul 2009 Location: Texas
Posts: 195
Thanks: 179
Thanked 16 Times in 11 Posts
|
C# is now standard in the industry. I wouldn't waste my time unless there's something really specific you need C++ for.
|
| | |
| | #44 |
| Active Warrior War Room Member Join Date: Jul 2009
Posts: 56
Thanks: 2
Thanked 3 Times in 3 Posts
| |
| | |
| | #45 | |
| Warrior Member Join Date: Jul 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
| Quote:
I think you'll find language usage graphs around the net that show C++ is still a very capable language and used language, with probably the widest variety of proven libraries out there. Plus C++ is a great language for writing extentions to PHP. The strong typed nature of C++ as compared to PHP might give you fits at first, but the learning curve will not likely be long. | |
| Simple Effective Software - ClutterKiller and Snap 'n Share
| ||
| | |
| | #46 |
| HyperActive Warrior War Room Member Join Date: May 2009
Posts: 319
Thanks: 36
Thanked 23 Times in 20 Posts
|
Probably because when it comes to writing an OS you need to compile to native code rather than run it interpreted via IL. I would agree that its use is still probably quite high but there are plenty of other languages that dont have the learning curve of C++ and are still strongly typed, Delphi and Java are two that spring to mind straight-away. In fact with Delphi it can do everything C++ can, the only thing C++ offers over Delphi is multiple inheritance and operator overloading. So getting back on track and has been stated above why learn c++?? |
| Marketing Strategies app now in the app store
| |
| | |
| | #47 |
| Warrior Member Join Date: Jun 2009 Location: Europe
Posts: 13
Thanks: 1
Thanked 1 Time in 1 Post
|
if you want to learn C++ i suggest you take a course there are parts that you will need someone to help you and understand certain code.. believe me.. there are a lot of good books but a teacher is better !
|
| | |
| | #48 |
| Active Warrior War Room Member Join Date: May 2009
Posts: 31
Thanks: 7
Thanked 4 Times in 4 Posts
|
I second that, can you find a local course? It might allow you to get your feet wet in a supported environment & decide if you really want to get stuck in? It's quite a large language to learn and to really benefit from more advanced features you'd need a good bit of experience with it.
|
| | |
| | #49 |
| CoolRyan.com is Now Live! War Room Member Join Date: Nov 2007 Location: Dayton, OH, USA
Posts: 308
Thanks: 35
Thanked 191 Times in 22 Posts
|
No Matter what you use, make sure you stay platform independent. 3/4 of all books that teach VC++ teach you how to build the visual stuff before the code and don't focus nearly as much on the language itself. Stay independent. Don't get pinned down into one operating system. Especially Since Google's new Operating system, (Chrome) will be coming out next year. GET READY!!! I hope this helps. |
| | |
| | |
| | #50 |
| Best Web Designers War Room Member Join Date: May 2009 Location: BestWebDesigners.org
Posts: 472
Thanks: 57
Thanked 27 Times in 23 Posts
| |
| | |
| | |
![]() |
|
| Tags |
| c++, learn, tutorial |
| Thread Tools | |
| |
![]() |