Seite 170 von 340 ErsteErste ... 70 120 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 220 270 ... LetzteLetzte
Zeige Ergebnis 5.071 bis 5.100 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; adrahil - I know it's no where near as optimized as the string.h functions are, and to me, I was ...

  
  1. #5071
    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

    adrahil - I know it's no where near as optimized as the string.h functions are, and to me, I was converting a larger array of characters into a smaller one with specific start and end elements :-P



    ...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


  2. #5072
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Is there a command that cleans up the directory?
    i mean deleten all .O's , .elfs , but dont touch the source

  3. #5073
    QJ Gamer Green
    Points: 5.795, Level: 49
    Level completed: 23%, Points required for next Level: 155
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Cape Town, South Africa
    Beiträge
    714
    Points
    5.795
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    make clean

  4. #5074
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    oke i made a programm for nothing :P , thnx anyway;)

  5. #5075
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Am I doing struct pointers right?

    Code:
    typedef struct {
    some vars here;
    } sometype;
    
    typedef struct{
    sometype something;
    } parent;
    
    callingfunc (&someparentstruct.memberstruct);
    
    void somefunc(sometype* *thestruct)
    {
    *thestruct.membervar = something;
    }
    That's the best I can explain without actual code.

    I would like to directly change a member from some struct directly by using "Passing by reference"

  6. #5076
    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

    thestruct->member = value
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  7. #5077
    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

    or

    (*thestruct).member = value

    :-P

    P.S. Being a general C question, you really should've googled for it before posting here.

    ...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


  8. #5078
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57
    P.S. Being a general C question, you really should've googled for it before posting here.
    I always ask instead of google.

  9. #5079
    QJ Gamer Green
    Points: 11.300, Level: 70
    Level completed: 13%, Points required for next Level: 350
    Overall activity: 0%

    Registriert seit
    Dec 2006
    Ort
    main();
    Beiträge
    1.071
    Points
    11.300
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Mr305
    I always ask instead of google.
    Why should we give you an answer if you haven't tried to figure it out on your own first?

  10. #5080
    QJ Gamer Silver
    Points: 14.087, Level: 77
    Level completed: 10%, Points required for next Level: 363
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Germany
    Beiträge
    926
    Points
    14.087
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Mr305
    I always ask instead of google.
    Which is the reason why a lot of people on internet forums get so easily pissed on questions that get asked.
    Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
    Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
    Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
    Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.

  11. #5081
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von -PSPJunkie-
    Why should we give you an answer if you haven't tried to figure it out on your own first?
    Zitat Zitat von Raphael
    Which is the reason why a lot of people on internet forums get so easily pissed on questions that get asked.
    Hello... Please, everyone, the doc and everyone.. Think before u type...

    I meant ask as www.ASK.COM like www.GOOGLE.com... to all!
    I prefer ask.com not google.com, which is a leading web search engine that is reliable and relevant in results.

    That is why the text Google and Ask was italicized in the prev post.

  12. #5082
    QJ Gamer Silver
    Points: 14.087, Level: 77
    Level completed: 10%, Points required for next Level: 363
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Germany
    Beiträge
    926
    Points
    14.087
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    Ok, then that joke went aside of me, because I just don't know ask.com.
    Sorry for that, but I wasn't just talking about you, but about the general attitude of people to rather ask questions on a forum than to do some search on their own.
    Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
    Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
    Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
    Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.

  13. #5083
    QJ Gamer Green
    Points: 4.824, Level: 44
    Level completed: 37%, Points required for next Level: 126
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    317
    Points
    4.824
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Ok, I am trying to use Dev-cpp as my development environment but I'm getting problems. First I get a message saying no GNU Make found and it asks me if I want to use the one in Dev-cpp. Then I go to compile and it says /lib/build.mak no file or directory found. Help?
    Current releases:
    Icon Action Replacer v1.5- latest release
    Current projects:
    PSP C++ IDE - Currently v1.6
    RPG Paradise - Latest version at my website

  14. #5084
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    that error get you when you dindt install toolchain fine in cygwin

  15. #5085
    QJ Gamer Green
    Points: 4.824, Level: 44
    Level completed: 37%, Points required for next Level: 126
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    317
    Points
    4.824
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    I think its because the PSPSDK var has to be set. How do you do that in Dev-cpp?
    Current releases:
    Icon Action Replacer v1.5- latest release
    Current projects:
    PSP C++ IDE - Currently v1.6
    RPG Paradise - Latest version at my website

  16. #5086
    QJ Gamer Blue
    Points: 3.679, Level: 38
    Level completed: 20%, Points required for next Level: 121
    Overall activity: 0%

    Registriert seit
    Apr 2007
    Ort
    Relative
    Beiträge
    135
    Points
    3.679
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    Ok I'm going nuts here.
    Why is this happening?
    Code:
    void escape(char s[], char t[])
    {
         char c;
         int i;
         i = 0;
    
         while((c = t[i]) != '\0'){
                  switch (c){
                  case '\n':
                       s[i] = '\\';
                       ++i;          //<---- A
                       s[i] = 'n';
                       break;
                  case '\t':
                       s[i] = '\\';
                       ++i;          //<---- B
                       s[i] = 't';
                       break;
                  default:
                       s[i] = t[i];
                       ++i;
                       break;
                  }
         }
         s[i] = '\0';
    }
    This function is supposed to replace '\n' and '\t' with with just those letters in a string.
    So
    Code:
    This is a string
    that uses a new row
    after the function should be
    Code:
    This is a string \nthat uses a new row
    all i get is
    Code:
    This is a string \that uses a new row
    When it gets to points A or B it just doesn't increment? It tried ++i, i++, i += 1 and nothing seems to work!

    I wasted this entire day trying to figure out whats wrong. Someone please help. I know its something retarded.

    TIA

  17. #5087
    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

    Break out a debugger on your PC and step through the code. The mistake should jump right out. Better yet, get a pen and paper and manually go through the algorithm yourself line by line taking extra attention on what t[i] is at the beginning of every loop.

    There is one large logic flaw with that algorithm, you are trying to put two chars in the place of one which doesn't work with raw arrays. Either use the C string library and the insert function or the C++ string class.

    If you stick with the C string method then be careful of over running the buffer.

  18. #5088
    QJ Gamer Blue
    Points: 3.679, Level: 38
    Level completed: 20%, Points required for next Level: 121
    Overall activity: 0%

    Registriert seit
    Apr 2007
    Ort
    Relative
    Beiträge
    135
    Points
    3.679
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    OMG i'm an idiot. Thank you yaustar. :ROFL:

    I'm moving s[i] and t[i] at the same time, so when I try to insert '\\' and 'n' basically I'm jumping over t each time, that would explain the missing letter.
    :Argh:

    Thank you again, I like answers that make me think.
    Spoiler for NEW CODE:
    void escape(char s[], char t[])
    {
    char c;
    int i,n;
    i = n = 0;

    while((c = t[n]) != '\0'){
    switch (c){
    case '\n':
    s[i] = '\\';
    s[++i] = 'n';
    break;
    case '\t':
    s[i] = '\\';
    s[++i] = 't';
    break;
    default:
    s[i] = t[n];
    break;
    }
    ++i;
    ++n;
    }
    s[i] = '\0';
    }

  19. #5089
    QJ Gamer Bronze
    Points: 4.706, Level: 43
    Level completed: 78%, Points required for next Level: 44
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    57
    Points
    4.706
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    I have c++ for dummies 5th edition plus the iso of the cd included with it. But is there more approfounded things for a beginner who wants to learn to program with c++? Is there a software that can allow the user to use immediately what he has learned by that same software through some practice programming. exercices?

  20. #5090
    QJ Gamer Green
    Points: 4.824, Level: 44
    Level completed: 37%, Points required for next Level: 126
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    317
    Points
    4.824
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    When u read the book, it tells you that there is a compiler on the CD and that is what you use to compile your exercises.
    Current releases:
    Icon Action Replacer v1.5- latest release
    Current projects:
    PSP C++ IDE - Currently v1.6
    RPG Paradise - Latest version at my website

  21. #5091
    QJ Gamer Green
    Points: 9.165, Level: 64
    Level completed: 39%, Points required for next Level: 185
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    England ~¦¦¦|+|¦¦¦~
    Beiträge
    1.112
    Points
    9.165
    Level
    64
    My Mood
    Bored
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von pspballer07
    Ok, I am trying to use Dev-cpp as my development environment but I'm getting problems. First I get a message saying no GNU Make found and it asks me if I want to use the one in Dev-cpp. Then I go to compile and it says /lib/build.mak no file or directory found. Help?
    In the makefile for your project, replace '(PSPSDK)/lib/build.mak' with the entire path, eg. 'C:/cygwin/usr/local/pspdev/psp/sdk/lib/build.mak' Worked for me.
    ...Just Returned To The Scene...

  22. #5092
    QJ Gamer Green
    Points: 4.824, Level: 44
    Level completed: 37%, Points required for next Level: 126
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    317
    Points
    4.824
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    I was going to do that but somehow it works now. thanks anyway
    Current releases:
    Icon Action Replacer v1.5- latest release
    Current projects:
    PSP C++ IDE - Currently v1.6
    RPG Paradise - Latest version at my website

  23. #5093
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Raphael
    Ok, then that joke went aside of me, because I just don't know ask.com.
    its the Algorithm
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

  24. #5094
    QJ Gamer Silver
    Points: 14.087, Level: 77
    Level completed: 10%, Points required for next Level: 363
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Germany
    Beiträge
    926
    Points
    14.087
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von BlackShark
    its the Algorithm
    Excuse me?
    Raphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
    Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
    Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
    Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.

  25. #5095
    QJ Gamer Green
    Points: 4.824, Level: 44
    Level completed: 37%, Points required for next Level: 126
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    317
    Points
    4.824
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    lol "chicks with swords"
    ask.com......
    Current releases:
    Icon Action Replacer v1.5- latest release
    Current projects:
    PSP C++ IDE - Currently v1.6
    RPG Paradise - Latest version at my website

  26. #5096
    QJ Gamer Green
    Points: 11.300, Level: 70
    Level completed: 13%, Points required for next Level: 350
    Overall activity: 0%

    Registriert seit
    Dec 2006
    Ort
    main();
    Beiträge
    1.071
    Points
    11.300
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von pspballer07
    lol "chicks with swords"
    ask.com......
    How... irrelevant.

  27. #5097
    QJ Gamer Green
    Points: 4.824, Level: 44
    Level completed: 37%, Points required for next Level: 126
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    317
    Points
    4.824
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    its the commercial, just a joke
    Current releases:
    Icon Action Replacer v1.5- latest release
    Current projects:
    PSP C++ IDE - Currently v1.6
    RPG Paradise - Latest version at my website

  28. #5098
    QJ Gamer Silver
    Points: 7.278, Level: 56
    Level completed: 64%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    Pimp'en in the US F#
    Beiträge
    1.254
    Points
    7.278
    Level
    56
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Raphael
    Excuse me?
    The Wentire Worls in two Sectors....
    When did I get dev statz?
    Spoiler for my PSP homebrewReleases:
    Ace of Space V1|PvP Pong Online|PvP Pong v3 | 3.03 BlackShark Custom Firmware
    (PvP Pong DL'ed well over 2403 times combined! get yours now!)
    Spoiler for Great Quotes:

    "No Snowflake in an Avalanche ever feels responsible....." - Fortune Cookie.

  29. #5099
    Points: 3.158, Level: 34
    Level completed: 72%, Points required for next Level: 42
    Overall activity: 0%

    Registriert seit
    Jun 2007
    Beiträge
    2
    Points
    3.158
    Level
    34
    Downloads
    0
    Uploads
    0

    Standard

    Hey.. Im trying to beging learning C++ can any1 tell me were i can get a good compiler? for a beginer? and were to download it from>?

  30. #5100
    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

    Don't go out to learn C++ if this is going to be your first programming language. Learn Python instead. It is MUCH easier to learn and less pitfalls in the language then C++. This means you can focus on the generic programming concepts and basics more then worrying about the language syntax. Tutorials can be found here

    If you still want to learn C++ first then grab wxDevCpp which is a much more up to date and maintained version of DevCpp. Then get this book: Teach yourself C++ in 21 days. It is one the best beginners books I have seen to date. Do not read the online version that I found (Second edition and lower) since it was written before the C++ standard and therefore teaches 'wrong' C++ code.


 

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:14 PM Uhr.

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