Some quick help is possible :)

This is a discussion on Some quick help is possible :) within the C++ Programming forums, part of the General Programming Boards category; Hi just wondered if anyone could do me a favor... I've been given some code to look over, adapt etc ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    82

    Some quick help if possible :)

    Hi just wondered if anyone could do me a favor...

    I've been given some code to look over, adapt etc but it doesn't run or compile on my dev-c++ compiler.

    I was told it should work fine but because i have little experience i can't really tell if it's me, the code or if i'am doing something fundementally wrong which wouldn't surprise me

    The link is below, it's not a virus but ZCS a learning classifier, i'll understand if no one wants to download it, and i hope i haven't broken any rules in this post.

    http://rapidshare.de/files/14591759/MCS.cpp.html

    Regards Wolfe
    Last edited by Cdrwolfe; 03-03-2006 at 09:26 AM.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    All I get is rapidshare adverts

  3. #3
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    That's cause you can only link so close to an item on rapid share. You have to click free... then you have to put in the three digit code and download.

    Or the OP could actually normal and just post the code or even attach the source in the post.

    Anyway, the first problem you're having is you're compiling C code as a .cpp. And when the code has identifiers such as "class" which share the names with C++ keywords... you're going to have problems when you compile as a CPP.

    The second problem is that whoever wrote it uses the function random() which isn't declared. Based on how he uses it, I'd imagine he wanted to use rand().

    Change those and it compiles. It doesn't run though.
    Last edited by SlyMaelstrom; 03-03-2006 at 11:08 AM.
    Sent from my iPadŽ

  4. #4
    Registered User mrafcho001's Avatar
    Join Date
    Jan 2005
    Posts
    483
    it also uses outdated header files.
    My Website
    010000110010101100101011
    Add Color To Your Code!

  5. #5
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,066
    Quote Originally Posted by mrafcho001
    it also uses outdated header files.
    As I said, it's C code.
    Sent from my iPadŽ

  6. #6
    Registered User
    Join Date
    Oct 2005
    Posts
    82
    Thanks you very much i'll see what i can do Greatly appreciated

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. strcmp returning 1...
    By Axel in forum C Programming
    Replies: 12
    Last Post: 09-08-2006, 07:48 PM
  2. Do you know...
    By davejigsaw in forum C++ Programming
    Replies: 1
    Last Post: 05-10-2005, 10:33 AM
  3. Questions on basic Quick Sort
    By Weng in forum C++ Programming
    Replies: 4
    Last Post: 12-16-2003, 09:06 AM
  4. Quick Sort Help
    By NavyBlue in forum C Programming
    Replies: 1
    Last Post: 03-02-2003, 09:34 PM
  5. Replies: 0
    Last Post: 04-30-2002, 07:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21