Random Homebrew: Scorch
Friends: Coding 'n Cracking - Nymphaea - PS3 Forum - darkforestgroup - daxhordes.org - Tgames - coldbird - gopsp.it - pspstation.org - prometheus - hgoel.info - MakeSmartTV - ps vita

[HELP] Confused..C or C++?

Forum rules
Any post not directly related to programming will be moderated.
Do not request people to code something for you.
Avoid posting messages that do not bring anything to the conversation. We want the threads in this subforum to stay focused.

[HELP] Confused..C or C++?

Postby RisingACK » Mon Oct 18, 2010 10:57 am

I want to start programming for PSP, so I have started first learning C++ for PC. ( I am at the beginning). But, now that I am looking better, I see that all the tutorials for programming , are on C not on C++, Somebody told me that a C++ dev, think differently from a C dev, so, my question now is: Should I stop learning C++ and start learning C? And if not, where can I find c++ tutorials for PSP?
Spoiler
Favorite command:
Code: Select all
make clean && clear && make && cp E* /media/RisingACK/PSP/GAME/HbPathName
RisingACK
 
Posts: 70
Joined: Sat Oct 16, 2010 7:25 pm

Re: [HELP] Confused..C or C++?

Postby wololo » Mon Oct 18, 2010 1:00 pm

you can use C in C++.
People who can code in C++ can code in C, the opposite is not necessarily true.

However C is a good language to learn, because it allows you to make many mistakes (and one learns from their mistakes) and only has very basic data structures.

Also, it depends what you want to do going forward. If the PSP is the only platform you want to develop for, then C might be a good choice because you will find more code samples. If you're thinking of further development on other platforms, C++ is a more modern language, and by learning the concepts of Object Oriented programming, you'll have better chances with other OO languages such as Java, Objective C, C#, etc...

It also depends what you want to do. For simple tasks you don't necessarily need C++. I wouldn't use C++ on HBL because pure C feels a bit "closer" to the machine, which is what we need in this kind of project.

But for a "high level" project such as a game, I would recommend C++ over C
I have a few US PSN codes to sell for a reasonable price (cheaper than pcgamesupply). PM me if interested, 1st come 1st serve basis..

Looking for guest bloggers and news hunters here at wololo.net, PM me!
wololo
Site Admin
 
Posts: 4642
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: [HELP] Confused..C or C++?

Postby haydeshell » Mon Oct 18, 2010 1:13 pm

Were Could I Find Some Free C Programms :{P
Image
haydeshell
 
Posts: 202
Joined: Wed Oct 13, 2010 4:52 am
Location: Have a guess

Re: [HELP] Confused..C or C++?

Postby wololo » Mon Oct 18, 2010 1:20 pm

You mean a compiler? The most famous is gcc, and it is free. For the PSP, use the pspsdk, which includes psp-gcc (free as well)

For windows, if you're looking for a "all in one" thing, Visual C++ Express is a free IDE which includes a C++ compiler.
I have a few US PSN codes to sell for a reasonable price (cheaper than pcgamesupply). PM me if interested, 1st come 1st serve basis..

Looking for guest bloggers and news hunters here at wololo.net, PM me!
wololo
Site Admin
 
Posts: 4642
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: [HELP] Confused..C or C++?

Postby RisingACK » Mon Oct 18, 2010 6:02 pm

Thank you for the good advices, Wololo. Now that I think better, yes, I will program also on PC, and on PSP, I am not oriented in making games, I just want to make some applications, like file manipulation stuff, or things that are using wlan and usb .The good news isthat I do not have to stop learning C++, but the bad news is that there are not C++ tuts for psp...Any help would be apreciated.
Spoiler
Favorite command:
Code: Select all
make clean && clear && make && cp E* /media/RisingACK/PSP/GAME/HbPathName
RisingACK
 
Posts: 70
Joined: Sat Oct 16, 2010 7:25 pm

Re: [HELP] Confused..C or C++?

Postby m0skit0 » Mon Oct 18, 2010 9:25 pm

Wololo wrote:People who can code in C++ can code in C, the opposite is not necessarily true.

I disagree. Most OO programmers I know can only think about data and not about code. OOP is strongly data-related, and that's not always the best solution.

RisingACK wrote:I am not oriented in making games, I just want to make some applications, like file manipulation stuff, or things that are using wlan and usb

Then I suggest learning C first. Anyway, it will do you good for C++, as C++ is an extension of C (as its name implies). I think starting with structured programming (C) instead of object-oriented programming (C++) will give you a better insight on how computer works, since OOP introduces more abstraction from how the computer actually manages the data. The coding "style", or the way you have to think about resolving problems are different on each language, since they have different approaches. For big software, like games or applications, C++ is recommended, because the solidity of object-oriented programming is a "must" with so much lines of code. For stuff like hardware access, low level processing, C is better, because you get rid of class wrapping which only makes it slower and memory consuming.

And as I said you can later incorporate C++ to your C knowledge, although you'll have to take a different focus when using C++ (some people just use C++ as structured language -using C++ features in C-like code-, which is just plain horrible). Being good at C will make you better at C++ (if you can know when to use each one or which programming approach to a given problem). C++ can do anything C can, but C doesn't have OOP features like C++.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
User avatar
m0skit0
Guru
 
Posts: 4787
Joined: Mon Sep 27, 2010 6:01 pm

Re: [HELP] Confused..C or C++?

Postby jon_17_ » Mon Oct 18, 2010 9:37 pm

what types of programming are used to PSP, in addition to C, C + +?
jon_17_
 
Posts: 7
Joined: Sun Oct 17, 2010 8:54 pm

Re: [HELP] Confused..C or C++?

Postby NightStar3 » Mon Oct 18, 2010 9:40 pm

jon_17_ wrote:what types of programming are used to PSP, in addition to C, C + +?

you could try learning lua
Image
User avatar
NightStar3
VIP
 
Posts: 459
Joined: Mon Sep 27, 2010 8:22 pm
Location: 0x13371A4D

Re: [HELP] Confused..C or C++?

Postby jon_17_ » Mon Oct 18, 2010 9:54 pm

but then there is only these three schedules for psp (LUA, C, C + +)?
jon_17_
 
Posts: 7
Joined: Sun Oct 17, 2010 8:54 pm

Re: [HELP] Confused..C or C++?

Postby Organized_Chaos » Tue Oct 19, 2010 2:58 am

jon_17_ wrote:what types of programming are used to PSP, in addition to C, C + +?

Lua. There's also a Ruby interpreter. Not sure how good it is. It'd be hard to find support for ruby. I think you can use theD programming language. Not sure how much support there is with that or how much different it is from C/C++...


C/C++ is the most common.
PSP-1001 5.00 M33-6, PSPp-2001 5.50 GEN-D3, Wii 4.2U softmod, Xbox 360 Elite 250 GB HDD
Organized_Chaos
 
Posts: 54
Joined: Thu Sep 30, 2010 5:42 am
Location: Missouri, USA

Next

Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests