Jump to content


Photo
- - - - -

Basics of C++


  • Please log in to reply
8 replies to this topic

#1 Mazahyr

Mazahyr

    Lifer

  • Members
  • PipPipPipPipPipPip
  • 2,097 posts
  • Locationwhere the queen runs the kingdom :P

Posted 12 February 2012 - 06:55 PM

Hi Guys,
You must be like damn is it our 1st semester or what..? But anyways back to the old school days "cout<<" and "cin>>"days.

I've recently started working with it as a part of my Electronics course. But I still get stuck in codes. The basics. Although I've reached till Classes and Data Encapsulation but still when writing the code I feel like not able to structure it properly.

Could you help me out with it.? I need to get robust in coding but not getting hold of it. Share your views about it and how'd you overcome this back in your Uni days.

#2 PsychedelicBreakfast

PsychedelicBreakfast

    Member

  • Members
  • Pip
  • 197 posts
  • Locationamongst the stars

Posted 12 February 2012 - 07:13 PM

Are you using C++ on microcontrollers?

"They say you die twice. One time when you stop breathing and a second time, a bit later on, when somebody says your name for the last time." -Banksy


#3 Mazahyr

Mazahyr

    Lifer

  • Members
  • PipPipPipPipPipPip
  • 2,097 posts
  • Locationwhere the queen runs the kingdom :P

Posted 12 February 2012 - 07:32 PM

Are you using C++ on microcontrollers?

Yup at times...but usually I work on MikroC...it has predefined libraries..but to learn C++ is something I'm looking forward to.

#4 Asad

Asad

    Thulla

  • Administrators
  • 5,520 posts
  • LocationIslamabad

Posted 12 February 2012 - 07:39 PM

If you can work on MikroC, the basics of C/C++ should already be clear to you.

#5 Mazahyr

Mazahyr

    Lifer

  • Members
  • PipPipPipPipPipPip
  • 2,097 posts
  • Locationwhere the queen runs the kingdom :P

Posted 12 February 2012 - 07:45 PM

If you can work on MikroC, the basics of C/C++ should already be clear to you.

they are but at times i get stuck in nested loops..you know petty issues... I'm quite good at writing and reading code without any syntax issue...But implementing my own logic gets me screwed most of the times.
I need a way out of it...an exercise or something.

#6 Asad

Asad

    Thulla

  • Administrators
  • 5,520 posts
  • LocationIslamabad

Posted 12 February 2012 - 07:58 PM

You just need to practice more to understand the microcontroller features at your disposal and how to best use them. Perhaps studying examples and reading datasheets would be helpful for you.

#7 rafay18

rafay18

    Member

  • Members
  • Pip
  • 81 posts

Posted 14 February 2012 - 08:41 AM

Well practising would make you perfect. However, to improve logic, you should spare some time visiting and solving problems on the following sites:

http://projecteuler.net/

http://www.codechef.com/

#8 Mazahyr

Mazahyr

    Lifer

  • Members
  • PipPipPipPipPipPip
  • 2,097 posts
  • Locationwhere the queen runs the kingdom :P

Posted 14 February 2012 - 03:45 PM

Well practising would make you perfect. However, to improve logic, you should spare some time visiting and solving problems on the following sites:

http://projecteuler.net/

http://www.codechef.com/

Thanks will look into it....

#9 ehti

ehti

    Bronze member

  • Members
  • PipPip
  • 378 posts
  • LocationPekhawar

Posted 01 March 2012 - 01:22 PM

Write GAMES. For example, tic tac toe, or utilize classes and data encapsulation and build your own small game. This can help really well in understanding and makes one proficient in writing code.

Take a look at this which will help clear inheritance with example of making a 'game':
Once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for there you have been, and there you will always long to return - Leonardo da Vinci
Me. | ClockWorkMod recovery for Noir A8!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

Google Ads