OCAU group project?

Discussion in 'Programming & Software Development' started by Aamdaron, Nov 2, 2003.

  1. systemdown

    systemdown Member

    Joined:
    Oct 14, 2003
    Messages:
    716
    Location:
    Brisbane 4107
    It appears that your "abc" string was overwritten by the "def" string - which would mean that readSomething() is returning a pointer to the char array and not a copy of it.

    *Thinks for a bit*

    Of course.. the name of a char array is actually a constant pointer to the first char in the array. So disregard what I said about the char array being copied and returned, char arrays are special.

    Try this:

    Code:
    char* returnSomething( char *strValue )
    {
        char* readValue = new char[strlen(strValue)+1];
        strcpy( readValue, strValue );
        return readValue;
    }
    
    This is pretty much the only way to get a C string returned from a function, by declaring it to be on the heap (alternatively you can pass in a pointer to the C string to be manipulated as a parameter to the function, then modify it. This way you can 'return' a C string without using the return mechanism). Sorry for the confusion.

    As you can tell, I don't play with C strings much these days, I'm std::string all the way.
     
    Last edited: Nov 15, 2003
  2. systemdown

    systemdown Member

    Joined:
    Oct 14, 2003
    Messages:
    716
    Location:
    Brisbane 4107
    Sorry guys didn't mean to hijack the thread.. I'm sure Buzzard feels the same way. So those involved in the project, please feel free to continue :D
     
  3. Buzzard

    Buzzard Member

    Joined:
    Apr 10, 2002
    Messages:
    758
    Location:
    Dandenong
    Yeah, sorry about that :)

    Though I'm not sure if anyone is still interested in the project......
     
  4. MadOnion87

    MadOnion87 Member

    Joined:
    Jul 10, 2002
    Messages:
    3,232
    Location:
    Old Trafford, Manchester
    i am
    but few people said we should continue after few weeks so they get through their exams, but then i have exams after few weeks :(
     
  5. LINUX

    LINUX Member

    Joined:
    Sep 18, 2001
    Messages:
    3,062
    Location:
    Dudley, Newcastle
    i've got my last exam on thursday and ontop of that i'm near completion of my last project mapping the internet in 3D so i should be able to start some coding fairly soonish. within 2 weeks i'd say.
     
  6. Buzzard

    Buzzard Member

    Joined:
    Apr 10, 2002
    Messages:
    758
    Location:
    Dandenong
    Fair enough :)

    Three of my exams were in the first week, and the last in middle of the second week... I forget that other Unis are proably more considerate to student needs...

    Well, I got bored today so I wrote a (very) simple cpuid program. I would be interested to see if it works properly with P4s (particulary the Brand strings). Download (Very bad source included :))
     
  7. Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    bump. Anyone interested in an OCAU project still. If so I wouldn't mind getting involved. Would be great to be able to learn from the more experienced guys on here while putting some skills into practice.

    I'm not saying to do any of the projects already suggested in this thread but something new starting from scratch would probably be easier. Something that would assist the OCAU / Overclocker community would be good.
     
  8. MadOnion87

    MadOnion87 Member

    Joined:
    Jul 10, 2002
    Messages:
    3,232
    Location:
    Old Trafford, Manchester
    if theres anything happenning you can always count me in
    the thing is no one seems to be leading nor do we have a concept lol
     
  9. Nitrov8

    Nitrov8 Member

    Joined:
    Dec 24, 2001
    Messages:
    876
    Location:
    Perth
    infinite loop!
     
  10. Deltoid

    Deltoid Member

    Joined:
    May 24, 2003
    Messages:
    9,515
    Location:
    Brisbane
    Yeah, that would be the problem. I don't want to be a leader either, I was bumping it hoping someone would volunteer.
     
  11. stuffisgood

    stuffisgood Member

    Joined:
    Aug 1, 2001
    Messages:
    6,189
    Location:
    Whitsundays, QLD
    I have a web project I started and lost interest in if anyone is interested in picking up the torch as a group project. The basic idea was essentially digg for games, a community driven (and ad supported by AdSense) site based on a slightly different principal to current game review sites.

    Rather than the community giving games a score, registered users would simply vote for or against a game. An overall ranking would then be generated from the for/against scores. Ideally the site would also have facilities for user reviews (again, user reviewed in the vein of digg) and well as aggregating gaming press review scores ala Gamerankings.

    In my initial design (in my head, I have none of this on paper) images such as cover art etc would be dynamically extracted from Amazon and appropriately linked back as to provide an additional source of income.

    The mockup I created is still up at www.gamesmashers.com.
     

Share This Page

Advertisement: