Seite 272 von 340 ErsteErste ... 172 222 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 322 ... LetzteLetzte
Zeige Ergebnis 8.131 bis 8.160 von 10174

C/C++ Programming Help Thread

This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Still gives me the same error.. :/...

  
  1. #8131
    QJ Gamer Silver
    Points: 6.763, Level: 54
    Level completed: 7%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    413
    Points
    6.763
    Level
    54
    Downloads
    0
    Uploads
    0

    Standard

    Still gives me the same error.. :/


    Atheist, because I just won't believe in what doesn't show itself to me.

  2. #8132
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Well that way does work, I got it direct from NeHe's tutorials on GU, but yeah, your way does seem easier.

    @spike021:
    Nope, you need to do something along the lines of:

    Code:
    struct SceKernelLoadExecVSHParam param;
    memset(&param, 0, sizeof(param));
    param.size = sizeof(param);
    param.unk5 = 0x10000;
    param.vshmain_args = [insert args here];
    param.vshmain_args_size = sizeof([args buffer]);
    
    sceKernelExitVSHVSH(&param);
    Or something to that extent.

    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  3. #8133
    QJ Gamer Green
    Points: 5.646, Level: 48
    Level completed: 48%, Points required for next Level: 104
    Overall activity: 54,0%

    Registriert seit
    Sep 2007
    Beiträge
    743
    Points
    5.646
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega
    @spike021:
    Nope, you need to do something along the lines of:

    Code:
    struct SceKernelLoadExecVSHParam param;
    memset(&param, 0, sizeof(param));
    param.size = sizeof(param);
    param.unk5 = 0x10000;
    param.vshmain_args = [insert args here];
    param.vshmain_args_size = sizeof([args buffer]);
    
    sceKernelExitVSHVSH(&param);
    Or something to that extent.

    -Aura


    Hmmm, thanks Aura, I'll give it a try later and see if I can work it, otherwise, I'll just use the in-game method.
    [QUOTE=Archaemic]
    [size=1]My manwich![/size][/QUOTE]
    [QUOTE=mohaas05]lol i can't say d*ck?[/QUOTE]

  4. #8134
    QJ Gamer Silver
    Points: 6.763, Level: 54
    Level completed: 7%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    413
    Points
    6.763
    Level
    54
    Downloads
    0
    Uploads
    0

    Standard

    Nevermind I got it working now, thanks for the help guys.

    For some odd reason the graphics.o file had to be deleted.
    Atheist, because I just won't believe in what doesn't show itself to me.

  5. #8135
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von spike021
    Hmmm, thanks Aura, I'll give it a try later and see if I can work it, otherwise, I'll just use the in-game method.
    Seeing as you can't test it yourself, nor get the arguments yourself just yet, I'd probably go with the in game method for now, and use the "offical" method at a later date when your PSP is more homebrewable, I'd find the arguments for you myself but I'm on 3.52, and I know the arguments changed at 3.71 so its not much help.

    Oh, and incase there was any confusion about getting the arguments, write an app and store it in flash0:/vsh/module/vshmain.prx, int main(SceSize args, void* argp) and simply write a file with the arguments in it to have a look at with a hex editor or something. You may need a few dumps to help find what varies and what doesn't. Oh, and don't forget to load the vshmain_real.prx file under vsh mode, normal module loading won't work.

    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  6. #8136
    QJ Gamer Green
    Points: 5.646, Level: 48
    Level completed: 48%, Points required for next Level: 104
    Overall activity: 54,0%

    Registriert seit
    Sep 2007
    Beiträge
    743
    Points
    5.646
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega
    Seeing as you can't test it yourself, nor get the arguments yourself just yet, I'd probably go with the in game method for now, and use the "offical" method at a later date when your PSP is more homebrewable, I'd find the arguments for you myself but I'm on 3.52, and I know the arguments changed at 3.71 so its not much help.

    Oh, and incase there was any confusion about getting the arguments, write an app and store it in flash0:/vsh/module/vshmain.prx, int main(SceSize args, void* argp) and simply write a file with the arguments in it to have a look at with a hex editor or something. You may need a few dumps to help find what varies and what doesn't. Oh, and don't forget to load the vshmain_real.prx file under vsh mode, normal module loading won't work.

    -Aura
    Alright Aura, that will probably help a bit also. I actually do have someone that has been testing the homebrew files and such, but it should be fine. Thanks for the really quick replies too
    [QUOTE=Archaemic]
    [size=1]My manwich![/size][/QUOTE]
    [QUOTE=mohaas05]lol i can't say d*ck?[/QUOTE]

  7. #8137
    Ænima
    Points: 6.447, Level: 52
    Level completed: 49%, Points required for next Level: 103
    Overall activity: 0%

    Registriert seit
    Sep 2007
    Beiträge
    587
    Points
    6.447
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Aura, maybe you could load the EBOOT from the RAM. Load the EBOOT into the RAM, then instead of passing the path to the EBOOT for argp, pass the pointer to the memory address of it.
    [IMG]http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Zoso.svg/744px-Zoso.svg.png[/IMG]

    Looking for some good C programming tutorials for the PSP? Look no further! [URL="http://psp-coding.com/"]PSP-Coding.com[/URL] is your source for all your PSP coding needs.

  8. #8138
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    How is there any way to use the 'bigger than' and 'smaller than' operators in a switch statement?
    For example:
    Code:
    int main()
    {
    int x;
    int y;
    x = 50;
    y = 100;
    
    switch(y-x)
    {
    	case (>10):
    		//Code
    		break;
    	case (<10):
    		//Code
    		break;
    }
    return(0);
    }

  9. #8139
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Nope.

  10. #8140
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Judas
    Aura, maybe you could load the EBOOT from the RAM. Load the EBOOT into the RAM, then instead of passing the path to the EBOOT for argp, pass the pointer to the memory address of it.
    That failed too, as it doesn't load from a file it has no current working directory.

    Back to the drawing board
    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  11. #8141
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    static tablespec const yowzitch_table = { 23, 2, 2, -1, yowzitch_items };
    tablespec const *yowzitch = &yowzitch_table;
    
    /* Version and license information.
     */
    static char *vourzhon_items[] = {
        "1+\267", "1-Tile World: version " VERSION,
        "1+",     "1-Copyright \251 2001-2006 by Brian Raiter",
        "1+",     "1-compiled " COMPILE_TIME,
        "1+\267", "1!This program is free software; you can redistribute it and/or"
    	      " modify it under the terms of the GNU General Public License as"
    	      " published by the Free Software Foundation; either version 2 of"
    	      " the License, or (at your option) any later version.",
        "1+\267", "1!This program is distributed in the hope that it will be"
    	      " useful, but WITHOUT ANY WARRANTY; without even the implied"
    	      " warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR"
    	      " PURPOSE. See the GNU General Public License for more details.",
        "1+\267", "1!Bug reports are appreciated, and can be sent to"
    	      " [email protected]"
    };
    Code:
    help.c:54: error: expected '}' before 'COMPILE_TIME'
    Please someone tell me where its missing

  12. #8142
    QJ Gamer Platinum
    Points: 66.627, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    National Front Disco
    Beiträge
    13.057
    Points
    66.627
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Shouldn't it be:

    Code:
     "1+",     "1-compiled , COMPILE_TIME"
    I'm probably wrong... but meh.

  13. #8143
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    I doubt it, there is no problem with VERSION.

  14. #8144
    QJ Gamer Platinum
    Points: 66.627, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    National Front Disco
    Beiträge
    13.057
    Points
    66.627
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Oh, well then VERSION would be:

    Code:
    "1+\267", "1-Tile World: version , VERSION"
    But yeah, I'm wrong

  15. #8145
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    COMPILE_TIME is not being #defined.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  16. #8146
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    you're right, the header wasn't included with the source. It's anybody's guess how i'm going to find it. But thanks Archaemic.

  17. #8147
    QJ Gamer Blue
    Points: 5.871, Level: 49
    Level completed: 61%, Points required for next Level: 79
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Beiträge
    432
    Points
    5.871
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    hey i found a piece of code on the internet, and i think it will help download a string from the internet. i dont think the person posted the whole code though.

    Code:
    def download("www.google.com/logo.gif")
    {
        def file = new FileOutputStream(address.tokenize("/")[-1])
        def out = new BufferedOutputStream(file)
        out << new URL(address).openStream()
        out.close()
    }
    if you no what this does, or how to use it, im having trouble compiling because of stupid errors.
    thanks

  18. #8148
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    That isn't C++. I think it is Python or Ruby.

  19. #8149
    QJ Gamer Blue
    Points: 5.871, Level: 49
    Level completed: 61%, Points required for next Level: 79
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Beiträge
    432
    Points
    5.871
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    o alright, thanks

  20. #8150
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    No way that's Python...but it's definitely not C++. It looks vaguely like Java, but it's not.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  21. #8151
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    It's in a language called 'Groovy', an agile dynamic language for the Java Platform.

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  22. #8152
    QJ Gamer Blue
    Points: 4.964, Level: 45
    Level completed: 7%, Points required for next Level: 186
    Overall activity: 0%

    Registriert seit
    Jan 2008
    Ort
    Copperas Cove, Tx
    Beiträge
    62
    Points
    4.964
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    I just want to get something cleared up for myself. I understand that the PSP can run Lua, but apparently with this thread it can run C++ as well. I was just wondering if it is limited C++ (like ajax and the PSP browser) or can I code the full deal?

  23. #8153
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von NameTaken33
    I just want to get something cleared up for myself. I understand that the PSP can run Lua, but apparently with this thread it can run C++ as well. I was just wondering if it is limited C++ (like ajax and the PSP browser) or can I code the full deal?
    You have the full use of C++ language on the PSP.

  24. #8154
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Not strictly a PSP related programming question, but I respect you guys so I'd prefer asking here.

    I'm planning on learning graphics on a PC tomorrow, but I'm not sure what to use - OpenGL or DirectX?

    2nd question, which compiler/IDE would be best to use for whichever API.

    3rd question, which is the best site to learn from?

    I did try the NeHe stuff today, but I'm missing gLaux and I couldn't find it in the quick search I had, I'm just wondering if anyone knows of a compiler that comes with this?

    Hope you guys don't mind these questions.
    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  25. #8155
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    1.) I'd choose OpenGL, but me being an Apple guy my opinion may be biased ;). OpenGL is cross-platform though :)

    2.) Depends. Visual Studio is a pretty "out-of-the-box" package. I've never used it for anything more than command-line apps though. Code::blocks is very nice also, and I know Yaustar is always recommending it.

    3.) Nehe, http://videotutorialsrock.com/, and the free edition of "The Red Book", if you're learning OpenGL. No idea if you plan to use DirectX.

  26. #8156
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Code::Blocks! A new version of it was released recently:
    http://www.codeblocks.org/
    -= Double Post =-
    Zitat Zitat von yaustar
    You have the full use of C++ language on the PSP.
    What about the standard libraries? I know iostream wouldn't work, but what about <string> or <cmath> or <cstdlib> or <vector> etc.
    Geändert von michaelp (03-13-2008 um 05:39 PM Uhr) Grund: Automerged Doublepost

  27. #8157
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    It's all there. I'm pretty sure iostream does work, but it doesn't actually print text to the screen. It prints it to textfile created for console output.

  28. #8158
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    OpenGL, definitely. It's not bound to Windows.
    And yeah, Code::Blocks.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  29. #8159
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    How do I convert decimal to float?
    I got float to decimal though.

  30. #8160
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Anti-QuickJay
    How do I convert decimal to float?
    I got float to decimal though.
    What? floats hold decimal values. Do you mean double to float?


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:27 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .