Guru3D.com Forums

Go Back   Guru3D.com Forums > General > Programming/Html
Programming/Html C++,Visual Basic,HTML,Flash,OpenGL,Modelling,Java.


Reply
 
Thread Tools Display Modes
Tips for C/C++ programming?
Old
  (#1)
kakik09
Member Guru
 
Videocard: ZOTAC GTX 660 Ti AMP! SLI
Processor: Core i7 2600k @4.6 GHz
Mainboard: Gigabyte Z68X-UD3H B3
Memory: 8gb G. Skill Sniper 1600
Soundcard: ASUS Xonar DSX 5.1
PSU: Antec True Power 750w
Default Tips for C/C++ programming? - 06-15-2012, 16:21 | posts: 83 | Location: The Philippines

Does anyone have any tips for me about this? We're taking up C/C++ programming in high school this year and it would really help if anyone could share.
   
Reply With Quote
 
Old
  (#2)
scoutingwraith
Ancient Guru
 
scoutingwraith's Avatar
 
Videocard: 8800GTS 512 / GT335 1GB
Processor: E8200@3.2 / SU7300 1.73
Mainboard: Gigabyte P35DS3/IntelGS45
Memory: 2x2GB 800 / 2x4GB 1333
Soundcard: Azalia HD / Realtek HD
PSU: Corsair HX750W / 9 Cell
Default 06-15-2012, 17:53 | posts: 9,228 | Location: Sector ZZ9 Plural Z Alpha

Hmm i am no expert but i learned most of the basic stuff by reading some of these websites:

http://www.coronadoenterprises.com/t...cpp/index.html
http://msdn.microsoft.com/en-us/vstudio/hh388567.aspx
http://www.freebyte.com/programming/cpp/
http://www.trumphurst.com/cpplibs6.html
http://www.compilers.net/index.htm
   
Reply With Quote
Old
  (#3)
Black_ice_Spain
Ancient Guru
 
Black_ice_Spain's Avatar
 
Videocard: 6870 1000/1125 @ 1.237V
Processor: 2500K @ 4.4 / 1.28v
Mainboard: Z77P-D3
Memory: 8gb 1600 CL9
Soundcard: Xonar DG
PSU: AC Strike-X 600W
Default 06-15-2012, 21:55 | posts: 4,154 | Location: Spain

if you know other programming languages, will be easy.

Otherwise, just learn in class

Btw start with C++, learning object oriented languages is very easy if you do it from 0, and after that, non-OO languages (C), its almost the same, but less complex concepts.

Apart from that... comment everything ._., useless in class, but usefull later.
   
Reply With Quote
Old
  (#4)
ibitato
Ancient Guru
 
ibitato's Avatar
 
Videocard: 4870X2+4870 1GB on S T260
Processor: C2Q Q9450@3.6 1.384v
Mainboard: Asus Rampage Formula
Memory: 4x2GB@1080 5.5.5.15 5:6
Soundcard: Supreme FX II HD
PSU: Tagan TG900-BZ PipeRock
Default 06-15-2012, 23:15 | posts: 4,693 | Location: Spain

unce you get to know grammar and programming paradims (cant remember the
correct word) concentrate on getting to know apis and libraries
thats the key for beign productive on each assigment
   
Reply With Quote
 
Old
  (#5)
kakik09
Member Guru
 
Videocard: ZOTAC GTX 660 Ti AMP! SLI
Processor: Core i7 2600k @4.6 GHz
Mainboard: Gigabyte Z68X-UD3H B3
Memory: 8gb G. Skill Sniper 1600
Soundcard: ASUS Xonar DSX 5.1
PSU: Antec True Power 750w
Default 06-16-2012, 05:30 | posts: 83 | Location: The Philippines

Thanks guys, keep'em coming
   
Reply With Quote
Old
  (#6)
Ice Cube
Banned
 
Videocard: Gigabyte GTX 670
Processor: 2700K@4.5GHz/ Corsair H70
Mainboard: Asus P8Z77-V
Memory: Gskill RipJaws 8GB-1600
Soundcard: Onboard
PSU: Seasonic 850W(80+Gold)
Default 06-20-2012, 15:42 | posts: 191 | Location: Refrigerator

Quote:
Originally Posted by ibitato View Post
unce you get to know grammar and programming paradims (cant remember the
correct word) concentrate on getting to know apis and libraries
thats the key for beign productive on each assigment
Its programming paradigm.. It is basically what approach you use to solve a problem.
Dear kakik09;
I haven't programmed i c/c++, but i have some experience in java.
My experience is that going trough ur text books and paying attention in class is more than enough. However, if you want to be a master, i suggest solving the problems given at the end of each chapter.

If the teacher solves a problem, think of a different(more efficient?) way to solve it. Immerse yourself into the subject. Make new problems out of existing problems. For example-
you have a problem that asks you to count the number of vowels in a given string sentence.

After your done with this, try things like finding the longest and shortest word in the sentence, printing the output to a file, arranging the words in alphabetical order(tricky if u haven't coded before). they will sharpen your skills and make you a better programmer; making you stand out from rest of the class when a tricky test/assignment comes up..

Hope i helped..

Last edited by Ice Cube; 06-20-2012 at 15:51.
   
Reply With Quote
Old
  (#7)
gamerk2
Maha Guru
 
Videocard: NVIDIA 570 GTX 1.2 GB
Processor: Intel i7 2600k @ 3.9GHz
Mainboard: ASUS P8P67 Deluxe
Memory: 8GB DDR3 1600 MHz
Soundcard: ASUS Xonar Xense
PSU: 750W
Default 06-25-2012, 21:22 | posts: 2,063 | Location: Medford, NY

Remember the differences between C and C++. Despite what many think, they are two totally different languages at heart. As a general rule, you shouldn't mix and match more then you have to (if at all).
   
Reply With Quote
Old
  (#8)
gamerk2
Maha Guru
 
Videocard: NVIDIA 570 GTX 1.2 GB
Processor: Intel i7 2600k @ 3.9GHz
Mainboard: ASUS P8P67 Deluxe
Memory: 8GB DDR3 1600 MHz
Soundcard: ASUS Xonar Xense
PSU: 750W
Default 06-26-2012, 13:14 | posts: 2,063 | Location: Medford, NY

Oh, one more thing: On Windows, use CString for ALL string datatypes. CString implicitly converts to LPCTSTR, which is the string datatype that most function calls require. CString is preferred even over std::string on Windows. For character types, use TCHAR on a windows system.

Trust me, using ONLY Windows datatypes will save you headaches in the long run.

http://www.flounder.com/cstring.htm

Also, remember the implicit "/0" some string datatypes have at the end of them, less you forget that CString(cat) is a FOUR element character array...

A few other more advanced things to NOT do in C/C++ programs:

http://www.flounder.com/badprogram.htm
   
Reply With Quote
Old
  (#9)
jamescarter
Newbie
 
jamescarter's Avatar
 
Videocard: GeForce GTX 580
Processor: Intel Core 2 Duo
Mainboard:
Memory:
Soundcard:
PSU: Seasonic M12II 650W Bronz
Default 04-16-2013, 13:02 | posts: 2 | Location: India

Hey, If you want good information about C and C++ then visit w3schools. This is the best website to learn C/C++ on an Internet. I hope this might be very helpful for you.
   
Reply With Quote
Old
  (#10)
southamptonfc
Master Guru
 
Videocard: (.)an
Processor: 2700k @ 4.6
Mainboard: Asus P8P67
Memory: 8Gb 2133
Soundcard: SB XFI
PSU: Corsair 850W
Default Yesterday, 11:57 | posts: 326 | Location: UK

The holy grail:

http://www.amazon.com/gp/product/032...SIN=0321334876

Understand and write code like this and you can get a job pretty much anywhere.
   
Reply With Quote
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump



Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com
Copyright (c) 1995-2012, All Rights Reserved. The Guru of 3D, the Hardware Guru, and 3D Guru are trademarks owned by Hilbert Hagedoorn.