Search:

Type: Posts; User: hewlettuser

Search: Search took 0.01 seconds.

  1. Character arrays - constant values in a constant expression

    Hi, does anyone know why I can use 'sizeof()' but not 'strlen()' for defining the size of an array. I get the following error message in the picture I've attached:

    15077

    Thanks in advance.
  2. Thank you for all your help, again. :-)

    Thank you for all your help, again. :-)
  3. I've put #include "isosceles.h" inside of...

    I've put #include "isosceles.h" inside of polygon.h and it all seems to be compiling well now. Is this the proper way to do inherited classes i.e. to "#include" the base class within it?
  4. #pragma once #include #define PI...

    #pragma once
    #include <math.h>


    #define PI 3.14159265358979323846


    class isosceles
    {
    private:
  5. Getting a C2504 Error, why? (A derived class problem)

    Hi all,

    I'm getting a C2504 error, (for those who don't know its a 'base class undefined' error) for what reason I do not know...

    beginning of my inherited polygon.h file:



    class polygon...
  6. Replies
    6
    Views
    1,741

    Thank-you for all your amazing feedback, its...

    Thank-you for all your amazing feedback, its helped me a great deal, cheers.
  7. Replies
    1
    Views
    785

    Simple question on derived classes

    Hi all,

    I have a derived a class 'box' from my base class 'rectangle'. My main problem is getting my constructor for box to work. My IDE complains that "No default constructor exists for class...
  8. Replies
    6
    Views
    1,741

    Thanks algorism, that helped a great deal. I...

    Thanks algorism, that helped a great deal. I thought I'd post the following here instead of making a new thread as its related:

    I'm confused as to why an extra character is returned in the while...
  9. Replies
    6
    Views
    1,741

    Help using argc and argv[]

    Hi all, I'm getting a MS visual C++ Runtime Library error when I run this I just want it to print the error when no arguments are put forward or just the return key is pressed after calling the...
  10. Replies
    4
    Views
    722

    Hello, just wanted to thank you all kindly for...

    Hello, just wanted to thank you all kindly for your answers. algorism thanks for showing me other ways to do it.
  11. Replies
    4
    Views
    722

    Update: I've managed to reverse it (In the...

    Update: I've managed to reverse it (In the original I didn't include the -1 in the phrase[strlen(phrase) - 1- i] part to account for the null terminator) However I still get a bogus character at the...
  12. Replies
    4
    Views
    722

    Simple program: no output.

    Hi all,

    I was wondering if someone here could help me. I don't understand why 'phrase_1' doesn't print. I hope you can see that this program's intentions are to reverse whats stored in the string...
  13. Overwhelmed by all your responses, read through...

    Overwhelmed by all your responses, read through them and got the code sorted. Now understanding it a bit more. Thanks for the help all.
  14. Expected output is missing from using fgets()

    Hi all, new to the forum :)

    Just wanted some assistance: does anyone know why the first word of the string isn't printed in the output when i use 'fgets()' in the code (below) and what can I do to...
Results 1 to 14 of 14