c string array

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
hotter
Posts: 53
Joined: Sun Dec 07, 2008 8:49 pm

c string array

Post by hotter »

how to make string array?
string s[100]; //doesnt work :( error: expected '=', ',', ';', 'asm' or '__attribute__' before 's'
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

urm for one there is no string type in C, you need to create an array of character arrays (or pointers to a allocated character array). If you are trying to use in C++ then make sure you have #include <string> and are using the 'std' namespace.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

If you don't even know how to make strings, you shouldn't be trying to program the PSP. Go learn how to program first, then come back. The PSP (or any game console) is not the place to learn how to program - a general purpose PC is. We also don't give beginner lessons here. This is a place for developers to discuss projects related to the PS2/PSP/PS3.
Post Reply