Search:

Type: Posts; User: peking1983

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    7
    Views
    1,488

    If you're going to count "down" to a number, why...

    If you're going to count "down" to a number, why would u want to change it to x--?

    I would suggest



    if(c_num < 0 )
    c_num = Math.abs(c_num);
  2. Replies
    9
    Views
    2,010

    We actually have an agreement with my University...

    We actually have an agreement with my University and Microsoft that we can get legitimate free copies of software to use while a student

    Such things as Visual Studio .NET, Windows XP, Windows...
  3. Replies
    4
    Views
    1,250

    Well the object contains a ptr to the string, so...

    Well the object contains a ptr to the string, so thanks for all your help.

    I think I'm going to use an array to easily limit the amount of pairs that can be changed and will have to worry a little...
  4. Replies
    4
    Views
    1,250

    String Lifetime & Scope

    Currently I am working to create a command line function that will alter data from an ini file.

    The catch is to do this I will change the string in the startup array in the object defined. The...
  5. Replies
    7
    Views
    1,130

    similar to the enum enum colors {orange,...

    similar to the enum


    enum colors {orange, yellow, red}

    So red is 3 in this case.

    Well in the array read in is like:
  6. Replies
    7
    Views
    1,130

    defined values lookup

    example pseudo code



    #define red 7

    //read in command line argument 'red' into char*
  7. Replies
    6
    Views
    1,970

    When I say 3rd argument, I was refering to it as...

    When I say 3rd argument, I was refering to it as the "error" way, 0,1,2,3. It is the last argument I was refering to.

    and As to not including C code, if that isnt, I've never seen C code in my...
  8. Replies
    6
    Views
    1,970

    So what you are saying is that the method should...

    So what you are saying is that the method should return void, which corrects that error.

    Is there a reason as to why that would give an error though. As I understand it, the 3rd argument is...
  9. Replies
    6
    Views
    1,970

    Void Pointer Warnings

    #include <stdio.h>
    #include <pthread.h>


    #define MAX_LINES 500
    #define LINE_LENGTH 80

    typedef struct args ARGS;

    char readin[MAX_LINES][LINE_LENGTH];
  10. Replies
    2
    Views
    1,394

    I only seem to have the stupid errors. :P Thx

    I only seem to have the stupid errors. :P
    Thx
  11. Replies
    2
    Views
    1,394

    Using TypeDefs

    I'm using a boolean typedef and recieivng these errors, I think it's due to the fact the way I'm passing.
    Im a little unsure since this is the first time Ive tried to use typedefs

    ERRORS:...
  12. Replies
    1
    Views
    1,408

    Undefined Error

    I seem to have a problem with my code, anytime I try to initialize the constructor PlaneList I recieve a not defined error. It shouldn't be because PlaneList.h is included. Assignment is due in hours...
  13. Replies
    1
    Views
    1,167

    here is the mainLine #include...

    here is the mainLine


    #include<iostream>
    #include<fstream>
    #include<string>
    #include "Event.h"
    #include "Simulation.h"
    #include "NiceOutput.h"
    #include "Queue.h"
  14. Replies
    1
    Views
    1,167

    strange error

    Im doing seperate compilation and recieiving this error:

    Undefined first referenced
    symbol in file
    Event::myFile ...
  15. ReadAndSum(dataFile, numberOfValues, average) ...

    ReadAndSum(dataFile, numberOfValues, average)

    is missing a ; as I see it
  16. Replies
    3
    Views
    2,512

    with a dynamic cast, does it return anything? ...

    with a dynamic cast, does it return anything?

    as in what should I be checking for to make sure it's the proper NumericTreeItem and not a StringTreeItem?

    if(data!=NULL)?

    if(data!=0)?
    ...
  17. Replies
    4
    Views
    1,326

    ah, so now I know why I couldnt get programs to...

    ah, so now I know why I couldnt get programs to work with accepting pointers to arrays explicitly.

    thx
  18. Replies
    2
    Views
    1,100

    XOR Question

    I was reading a thread about XOR, and having to do this for my current program had a question on it.

    I know && and || are part of C,

    so isnt there a way to have an XOR without doing several...
  19. Replies
    4
    Views
    1,326

    Passing Args Error

    I am recieiving this error:


    C:/Mike/Uni/216/A2/code.c:221: warning: passing arg 2 of `CheckSum' from incompatible pointer type
    C:/Mike/Uni/216/A2/code.c:226: warning: passing arg 2 of `digest'...
  20. Replies
    3
    Views
    2,512

    it always has to be the silly errors that make...

    it always has to be the silly errors that make you feel foolish
    :P
    thx
  21. Replies
    3
    Views
    2,512

    Dynamic Cast Errors

    I recieve this error when casting:

    C:/Mike/Uni/215/A2/tree.cpp:214: cannot dynamic_cast `
    currentNode->Node::getData()' (of type `<unknown type>') to type `class
    NumericTreeItem*' (source...
  22. Replies
    5
    Views
    1,576

    trying sprintf() I dont really understand the...

    trying sprintf() I dont really understand the function

    int sprintf(char*, const char*, ...)

    although I want to put it into a string, isnt a string just a char pointer? Although I am receiving...
  23. Replies
    5
    Views
    1,576

    well somewhat, although hard for me to find good...

    well somewhat, although hard for me to find good documentation on it.

    Plus, it wouldnt work for a double
  24. Replies
    5
    Views
    1,576

    number to string

    I am having trouble finding how to do this properly.

    I know there is a command atoi, but it changes a string to a number.

    Im looking for a function(if there exists) to change/cast a number so...
  25. Replies
    17
    Views
    2,165

    I think I am as far as I will get because the...

    I think I am as far as I will get because the assignment is due tommorrow. One question about freeing,

    in your example you set newNode and use malloc,(in AddNode)

    when freeing I would have to...
Results 1 to 25 of 36
Page 1 of 2 1 2