| View previous topic :: View next topic |
| Author |
Message |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Wed May 20, 2009 1:12 am Post subject: memset problem |
|
|
I have a problem when i use memset in my constructor.
This is my source:
| Code: | Image::Image(int Width,int Height) {
memset(data,0,Width*Height*sizeof(u32));
width=Width;
height=Height;
x=0;
y=0;
origx=0;
origy=0;
swizzled=0;
} |
data is:
When i use gdb it said that it crashes by the memset function.
What do i wrong? _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|
| Back to top |
|
 |
ps3fanboy
Joined: 06 Jul 2008 Posts: 66
|
|
| Back to top |
|
 |
jbit Site Admin

Joined: 28 May 2005 Posts: 293 Location: København, Danmark
|
Posted: Wed May 20, 2009 10:35 am Post subject: |
|
|
| Learn C/C++, then code on PSP... These forums aren't for basic code questions, there are PLENNNTTTY of forums for that. |
|
| Back to top |
|
 |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Thu May 21, 2009 2:05 am Post subject: |
|
|
| jbit wrote: | | Learn C/C++, then code on PSP... These forums aren't for basic code questions, there are PLENNNTTTY of forums for that. |
I know how to code c++ and this isn't my first thing op psp.
This is just the kind of mistake i often do. (use memset instead of malloc) _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|
| Back to top |
|
 |
|