Search:

Type: Posts; User: MadStrum!

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    818

    Simple Question

    const Matrix Matrix::operator+(const Matrix& rhs) const;


    Can someone explain to me what each const is for in this function prototype?
    Thanks.

    Pier.
  2. Replies
    7
    Views
    2,366

    Ok I get what you mean.... But I'm stuck with...

    Ok I get what you mean....
    But I'm stuck with this way of implementing the structure because it was given to me in my assignment.
    So I guess my method will work anyway?
    Thanks for sharing the...
  3. Replies
    7
    Views
    2,366

    Do you mean this.. (resultMatrix->element) =...

    Do you mean this..


    (resultMatrix->element) = new int*[resultMatrix->rows]; /*dynamic allocation of memory*/
    for (i=0; i<(resultMatrix->rows); i++)
    *((resultMatrix->element)+i) = new...
  4. Replies
    7
    Views
    2,366

    Dynamic 2D arrays question

    typedef struct {
    int rows;
    int cols;
    int ** element;
    } matrix;


    Is there any difference between using this to get to the int element is pointing at

    matrix * resultMatrix = new...
  5. Replies
    11
    Views
    1,171

    This is not I really want to do.... I want to...

    This is not I really want to do....

    I want to extract the address only (everything after Address = ) and put it in the address array.

    Pier.
  6. Replies
    11
    Views
    1,171

    Precisely.... in my case, I do not know how many...

    Precisely.... in my case, I do not know how many elements there are in address. Therefore, when I use %s or %99s it can at most read in the 1st element
    eg
    Address = 103 smith street

    when I...
  7. Replies
    11
    Views
    1,171

    Anyway, is there any short way to clear a string?...

    Anyway, is there any short way to clear a string?
    Instead of this :
    for (i=0; i <= 100; i++) address[i] = ' ';

    Pier.
  8. Replies
    11
    Views
    1,171

    I tried changing the %99c to %s and %99s, but it...

    I tried changing the %99c to %s and %99s, but it didn't work. This time the address was not even read in ...

    Pier.
  9. Replies
    11
    Views
    1,171

    Question regarding termination of strings

    Below is part of my code. address[] is an array of 100 characters
    I would like to ask how do I correctly terminate the address[] array so that when i call puts(address) only the current address is...
  10. Replies
    6
    Views
    1,025

    What do you mean by null terminating the strings...

    What do you mean by null terminating the strings ? What's the syntax like...
    Sorry I posted the question again, but I don't seem to be able to delete the thread...

    Pier.
  11. Replies
    6
    Views
    1,025

    upz

    upz
  12. Replies
    6
    Views
    1,025

    Sorry another similar question related to this ...

    Sorry another similar question related to this

    How do I read in a string
    "DOB = 10-10-1970"
    from a file and assign it to char arrays dob1, dob2 and dob3...?

    this is my code

    ...
  13. Replies
    6
    Views
    1,025

    Just solved the problem using %lf instead of...

    Just solved the problem using %lf instead of %f....
    what the hell is the difference between using %lf and %f when reading from a file?!?!
    argh... I spent two hours on this :(

    Pier.
  14. Replies
    6
    Views
    1,025

    Capturing float value from file

    Within the customers text file it says :
    Account Balance = 4000.00


    int main() {
    FILE * fp;
    char one[80];
    double theone;

    fp = fopen("customers.txt", "r");
  15. Replies
    6
    Views
    6,733

    Ok! Damm I must have lost a memory module or...

    Ok! Damm I must have lost a memory module or something...

    Pier.
  16. Replies
    6
    Views
    6,733

    Ok! Another simple question.... How do I detect...

    Ok! Another simple question....
    How do I detect it when fgets reads in a blank line?

    Pier.
  17. Replies
    6
    Views
    6,733

    You're suggesting that I read each line using...

    You're suggesting that I read each line using fgets and then process it internally using sscanf ?

    Pier.
  18. Replies
    6
    Views
    6,733

    fscanf() and fgetc()

    Let's say I have a file with the following characters

    i suck at this

    and I use fscanf() to access the text file.
    After accessing 'i' , will the file pointer skip over i to the white space?...
  19. Replies
    3
    Views
    1,657

    Thanks a lot guys :) Pier.

    Thanks a lot guys :)

    Pier.
  20. Replies
    3
    Views
    1,657

    Simple question with scanf()

    Let's say that I want scanf to process the following text

    balance = 100

    How do I skip over the word balance and the equal sign and capture only 100 and place it into an integer variable x?
    ...
  21. Replies
    1
    Views
    966

    Why doesn't this work? (strings)

    Found this code inside accelerated c++...as an exercise....
    I don't understand why the code does not work.. the bottom code...
    It gives the following error

    8...
  22. Replies
    1
    Views
    861

    Fark... think I was too used to typing...

    Fark... think I was too used to typing fflush(stdin)...
    thanks bro.

    Pier.
  23. Replies
    1
    Views
    861

    More file help...

    I'm trying to read some characters from a file and change the case of the characters in the file.
    Eg. in save.dat
    LifeSux

    It should turn out lIFEsUX, but it doesn't in this case, instead it gets...
  24. Replies
    5
    Views
    7,344

    Cool, Monster.... thanks a lot. Pier.

    Cool, Monster.... thanks a lot.

    Pier.
  25. Replies
    5
    Views
    7,344

    I was looking for a recursive solution along the...

    I was looking for a recursive solution along the lines of my solution.... I'm sure it can be done... it's just that I don't know how :)

    Pier.
Results 1 to 25 of 32
Page 1 of 2 1 2