PSP Hacks - Forums
Go Back   PSP Hacks - Forums > Tech Talk > PC Programming

Notices

Reply
 
Thread Tools Display Modes
  #21  
Old 05-14-2006, 02:36 PM
duncans_pumpkin duncans_pumpkin is offline
PSP Smarty
 
Join Date: Mar 2006
Posts: 130
duncans_pumpkin User Has a Beginner Reputation
Default

damn rich kids with there Visual C++ 6.0. I have to make do with the free alternatives DEV C++ all the way.
Reply With Quote
  #22  
Old 05-14-2006, 04:08 PM
LordCthulu LordCthulu is offline
Senior Member
PSP Veteran
 
Join Date: Mar 2005
Posts: 1,004
LordCthulu User Has a Beginner Reputation
Default

..... wow. lmao.

"I have to make do with the free alternatives DEV C++ all the way."

Dev C++ is the shit.
__________________
Member number: 3
Meat lover? Watch: http://www.chooseveg.com/animal-cruelty.asp
Reply With Quote
  #23  
Old 05-14-2006, 04:13 PM
Joe88's Avatar
Joe88 Joe88 is online now
Moderator
PSP Titan
 
Join Date: Jun 2005
Location: Staten Island, New York City
Posts: 21,350
Joe88 User Has a Beginner Reputation
Default

I tried dev C++ but it would even build programs and make them run like a little sample cout statment.
It couldnt find any of the stuff needed for it to build it. >_>
Thats why I mainly use MS visual C++ because I never had any problems with it or MS visual .NET 2003 either.
__________________

[λ] The cake is a lie... [λ]
Reply With Quote
  #24  
Old 05-14-2006, 04:49 PM
PSdonkey's Avatar
PSdonkey PSdonkey is offline
Squirrel Admin
PSP Titan
 
Join Date: Mar 2006
Posts: 9,089
PSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond repute
Default

Yesenia, you should stick with C++ as it is not that much different then C and most programs built for windows and or the psp is written in C++. For the psp, all you would have to do is link an extra library in your makefile of a program to use C++

Joe88 is right, stick to using Visual C++ as it has everything you need including lots of libraries and headers to compile any program.

Sparta, I know what you are saying but I am still only on lesson #2 as I do not want to get too many people confused about arrays when I haven't even mentioned them yet. However, in your case, you will need to add brackets [] with a number inside to let the compiler know how many spaces of memory the user has to input his response. An example is in the post I made earlier to Joe88 regarding inputing someone's name from the keyboard. Or if you already know what you want to put in the array, you can simply type something like this.
char msg[] = "Welcome to psp hacks";
Where as "char" is the data type, "msg" is the array name, "[]" means that we are using an unsized array, and "Welcome to psp hacks" is the data that we are inputing into our array.
Either way, I will be going into more depth about characters and arrays in the next couple of lessons.
__________________
Want to become a PSP Dev the easy way? Check out my tutorial for the PSP here www.psp-hacks.com/forums/viewtopic.php?id=65403
Want to learn how to create your own games on the PSP? Check out my tutorial here http://www.psp-hacks.com/forums/view...693884#p693884
Want to learn how to program C++ ? Check out that tutorial here www.psp-hacks.com/forums/viewtopic.php?id=28694
Reply With Quote
  #25  
Old 05-14-2006, 07:10 PM
PSdonkey's Avatar
PSdonkey PSdonkey is offline
Squirrel Admin
PSP Titan
 
Join Date: Mar 2006
Posts: 9,089
PSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond repute
Default

ok, time for next lesson. This will be about using cin and explaining decrement and increment operators. (Sorry, no arrays yet. Besides, before I get into arrays, we will need to go over loops (for, while, do-while) as most arrays are used in conjunction with arrays.

Lesson#3

Cin basically means to read from the keyboard. Notice how we used cout with the insert operation "<<" With cin, we use ">>" .

One note that I wanted to show everyone because it was already mentioned before, "endl" is the exact same thing as "\n" which means make a new line except endl doesn't need to be between quotations as "\n" does.
Also, remember before when I declared a variable, int x; or int num1; I then made a new line to declare another variable. You can declare all your variables in one line as long as they are all of the same data type and you seperate them with commas. For example,
int num1;
int num2;
int sum;
int product;

or you can just type

int num1,num2,sum,product;
------------------------------------
#include<iostream>
using namespace std;
int main()
{
int num1,num2;
cout<<"Enter a Whole number:";
cin>>num1;// reads num1 from computer
cout<<"Enter another Whole number:";
cin>>num2;//reads num2 from keyboard
cout<<"First number:"<<num1<<endl;
cout<<"Second number:"<<num2<<endl;
}
----------------------------------
That program will display the two numbers that the user entered from the keyboard.

Increment operator ++ means to increase the variable by one. It can be typed as either x++ or ++x

Decrement operator -- means to decrease the variable by one. It can be typed as x-- or --x

------
int x=5;
x++; // increase x by one
cout<<x<<endl;
------
The computer would display 6

------
int y=15;
y--; // Decrease y by 1
cout<<y<<endl;
------
The computer would display 14

------
int x=5, y=10;
y=x; //each variable can store only one value
cout<<x<<endl<<y<<endl;
------

The computer would display 5 and 5. X first started off as a value of 5 and Y started as a value of 10. Then we told the computer that whatever is stored in X to put that same value in Y. That is why now Y=5 which is the same value of x.

------
int x=2;
int y=12;
y=x++; // copy X into Y first then increase x by one
------
The answer would be x=3 and y=2. Y is equal to whatever x is at that moment which is 2. Then x gets increased by one after that so X then equals 3.

------
int x=10;
int y=15;
x= ++y; //increase Y first then put that value into x
------
The answer would be x=16 and y=16. Since the two postive signs ++ are before the Y variable, you increase Y first before anything. Then X will equal whatever the new value of Y is which is 16. And since Y was increased to 16 before it was placed inside the X variable, now Y is equal to 16 also.
Try this one for yourselves

------
int x=2;
int y=12;
x= --y;
------
__________________
Want to become a PSP Dev the easy way? Check out my tutorial for the PSP here www.psp-hacks.com/forums/viewtopic.php?id=65403
Want to learn how to create your own games on the PSP? Check out my tutorial here http://www.psp-hacks.com/forums/view...693884#p693884
Want to learn how to program C++ ? Check out that tutorial here www.psp-hacks.com/forums/viewtopic.php?id=28694
Reply With Quote
  #26  
Old 05-15-2006, 09:09 PM
PSdonkey's Avatar
PSdonkey PSdonkey is offline
Squirrel Admin
PSP Titan
 
Join Date: Mar 2006
Posts: 9,089
PSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond reputePSdonkey has a reputation beyond repute
Default

I guess not too many people are interested in C++ programming anymore. I guess I will hold off on more lessons until maybe later when more people want it. Maybe if people are interested, I can make some java which is object oriented programming lessons for those who would like to program graphics. Java is kind of like lua where it is much simplier to make graphics for the pc or psp then it is for C++
__________________
Want to become a PSP Dev the easy way? Check out my tutorial for the PSP here www.psp-hacks.com/forums/viewtopic.php?id=65403
Want to learn how to create your own games on the PSP? Check out my tutorial here http://www.psp-hacks.com/forums/view...693884#p693884
Want to learn how to program C++ ? Check out that tutorial here www.psp-hacks.com/forums/viewtopic.php?id=28694
Reply With Quote
  #27  
Old 05-15-2006, 09:40 PM
ready2destroymypsp ready2destroymypsp is offline
PSP Ninja
 
Join Date: Jan 2006
Posts: 667
ready2destroymypsp User Has a Beginner Reputation
Default

im interrested in learning...but is it really hard to pick up c++?....i've heard some people say it takes alot of practice to get great at it but just to understand the basics takes no time at all....?....
Reply With Quote
  #28  
Old 05-16-2006, 04:48 AM
josephhkim josephhkim is offline
PSP Newbie
 
Join Date: May 2006
Posts: 40
josephhkim User Has a Beginner Reputation
Default

hey dude, i dont' mean to flame or be deconstructive, but...

why are u teaching the same thing posted all over the net? they aren't very descriptive and i can see errors in the code already.

now before someone flames me, i'm more than happy to help teach. but i would prefer not to teach the same thing that is already everywhere.

heres a list of resourse:
[Books]
The C Programming Language - Kernighan and Ritchie - Amazon.com - Google - PDF
Google - CHM
The C++ Programming Language - Stroustrup - Amazon.com -
Starting Out With C++: Standard Version - Gaddis - Amazon.com -
The Geometry Toolbox for Graphics and Modeling - Gerald E. Farin, Dianne Hansford - Amazon.com -
Programming Windows, Fifth Edition - Charles Petzold - Amazon.com -
Essential Mathematics for Games and Interactive Applications, First Edition : A Programmer's Guide - James M. Van Verth, Lars M. Bishop - Amazon.com -


[Newbie/No Programming Experience]
www.cprogramming.com -- Most commonly posted site for tutorials, decent in my opinion. It gives you a very quick and broad overview of the language.
www.cplusplus.com -- Decent beginners tutorials. However, like most books they use a lot of computer terms.
www.cpp-home.com -- Great site with lots of tutorials for all skill levels, when it's up that is...
www.morrowland.com - NEWLY ADDED - Same thing that GameTutorials.com was doing for free until they started charging you for the tutorials. The great part about this is you get them for FREE!
www.programmersheaven.com - NEWLY ADDED - Numerous tutorials that range from good to bad, and skilled to newbie.
www.programmingtutorials.com - NEWLY ADDED - Links to a LOT of other tutorials that are not yet listed here.


[Intermediate]
NEHE.gamedev.net/ -- Decently written OpenGL tutorials, lacks a bit of function definition but good overall, and highly linked to. He has bad coding habits, so don't copy and paste the stuff, just use it for learning.
geosoft.no -- Once you've learned to program, you should start developing a good programming style so other programmers dont have to decode what you're trying to say. I agree with 80% of this document, so just use it as a guideline.
www.ultimategameprogramming.com - NEWLY ADDED - Very well written tutorials, they have a LARGE variety of them as well. Most of them are in the Demos section, they will be adding articles soon!
www.mevis.de/~uwe/opengl - NEWLY ADDED - Good reference for OpenGL Functions, similar setup to manpages.
www.glprogramming.com/red/ - NEWLY ADDED - Great site, full of content, and explains OpenGL VERY well.
www.glprogramming.com/blue/ - NEWLY ADDED - More technical than the red version, and again LOTS of content.
www.programmershelp.co.uk - NEWLY ADDED - Contains a lot of links to informational pages on the selected subject.
nexe.gamedev.net - NEWLY ADDED - The DirectX version of NeHe's tutorials.
www.xmission.com/~nate/ - NEWLY ADDED - An interesting way to teach OpenGL, havent tried it but I will soon. It's tutoring application that visually teaches you the library.
www.drunkenhyena.com - NEWLY ADDED - Great DirectX tutorials, however he uses a wrapper to teach you how to use them. So it's definately not a good way to learn.
www.glenmccl.com - NEWLY ADDED
www.codesampler.com - NEWLY ADDED - Decent place to get started on DirectX or OpenGL, coding by example, usually a bad way of learning, but thats why it's in the advanced section.
www.andypike.com - NEWLY ADDED - DirectX 8 Tutorials, however they are decently written. DirectX 8 was the last version to using the old fasion BitBlt() function.
msdn.microsoft.com - NEWLY ADDED - MSDN is ALWAYS a bookmark, and should be for ANY programmer.
www.opengl.org/resources/tutorials - NEWLY ADDED - OpenGL.org has a lot of resources, very helpful for OpenGL ofcourse.
www.eecs.tulane.edu/www/Terry/OpenGL - NEWLY ADDED - OpenGL tutorial that uses Language C.
www.humus.ca - NEWLY ADDED - A LOT OF TUTORIALS!
www.kegel.com/academy/ - NEWLY ADDED

[Advanced]
www.devmaster.net - NEWLY ADDED - Good tutorials, and very technical.
www.codeguru.com - NEWLY ADDED - A lot of topics are discussed here, very informational.
www.flipcode.com/tutorials/ - NEWLY ADDED - This one varies on skill levels, lots of advanced stuff here though.
http://mindprod.com/jgloss/unmain.html -- Programming as a profession? Want to keep your job? This documentation will help you write unmaintainable code, so if they fire you. They will have one hell of a time trying to figure out your code.

[Video Tutorials] - NEWLY ADDED
* I don't really think video tutorials teach a beginning user much, but some people might be able to learn from them. So, I decided to add this section to the list. *
ddrheaven.com/Tutorials - NEWLY ADDED - Video tutorial that is split into 16 parts. The guy has a UK Accent, and is not entirely boring to listen to. Submitted by kratos15


-list not mine, taken off the net.
Reply With Quote
  #29  
Old 05-16-2006, 04:49 AM
BOBGRYPHON BOBGRYPHON is offline
PSP Hacks Member
 
Join Date: Mar 2006
Posts: 288
BOBGRYPHON User Has a Beginner Reputation
Default

ps donkey is a fag the end
Reply With Quote
  #30  
Old 05-16-2006, 02:30 PM
lord lord is offline
Senior Member
PSP Monk
 
Join Date: Sep 2005
Location: Next door
Posts: 2,657
lord User Has a Beginner Reputation
Default

Quote:
Originally Posted by BOBGRYPHON
ps donkey is a fag the end
I'm so happy you are banned.
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


All times are GMT -4. The time now is 10:18 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©