Search:

Type: Posts; User: kocika73

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,508

    Thanks, Grumpy, I did not know that. @citizen,...

    Thanks, Grumpy, I did not know that.

    @citizen, this is an "anonymous union", it's working fine for built-in types. And as far as I know, it is legal in C++.
  2. Replies
    3
    Views
    1,508

    user defined template question

    I wrot e a template which successfully works for ints, floats, doubles etc. It includes a method which does a swap between two members of the class.
    For example:
    the class decl.


    template<...
  3. Replies
    3
    Views
    7,290

    Oh....... Thanks Daved. I knew it is something so...

    Oh....... Thanks Daved. I knew it is something so trivial...
  4. Replies
    3
    Views
    7,290

    template class default constructor problem

    I get an error:

    which I really do not understand... I only suspect there is something wrong with the default constructor, but I have no clue what.
    I have my template in .h file (all declarations...
  5. Replies
    4
    Views
    3,399

    Thanks Salem. Client is on Red Hat 7.2, but...

    Thanks Salem. Client is on Red Hat 7.2, but server is on SunOS 5.10 if I remember correctly the version number. Would it make a difference?
  6. Replies
    4
    Views
    3,399

    That's not what I meant. Thanks anyway. I have...

    That's not what I meant. Thanks anyway.
    I have no problems with files manipulation in C. My question is what I need to write to a log file of that type and if fprintf is what I'm looking for. The...
  7. Replies
    4
    Views
    3,399

    write a log file

    I do not even know where to start. How do I create a log file where after executing some client-server communication user can read what kind of info exchange was performed. I'm writing this in C....
  8. Replies
    12
    Views
    6,691

    Thanks, ChaosEngine! I'll try and see what I can...

    Thanks, ChaosEngine! I'll try and see what I can do with it!
  9. Replies
    12
    Views
    6,691

    Thanks Tonto, I'll think about it!

    Thanks Tonto, I'll think about it!
  10. Replies
    12
    Views
    6,691

    Can anybody explain to me what is going on below?...

    Can anybody explain to me what is going on below?


    class A {
    public:
    A(int i) {}
    };

    class B {
    char* myString;
  11. Replies
    12
    Views
    6,691

    Life would much easier if I could use string, but...

    Life would much easier if I could use string, but I have to use NTS instead... And I do not know anything about vectors yet... Thanks, but that will not solve my problem.......
    The whole trouble is...
  12. Replies
    12
    Views
    6,691

    Thanks! Oh...... That's why it was showing ONLY...

    Thanks! Oh...... That's why it was showing ONLY when in MyString class.......
    But how do I indicate that I want "name" to act in People class as MyString constructor?
  13. Replies
    12
    Views
    6,691

    OK, I made some changes... class People {...

    OK, I made some changes...


    class People {
    private:
    int age;
    MyString name;
    MyString address;
    public:
    People() {
  14. Replies
    12
    Views
    6,691

    Yes, displays fine.... All of the...

    Yes, displays fine....



    All of the constructors ask for data from keyboard, either all of it, or some part is given, like age.
  15. Replies
    12
    Views
    6,691

    show() method does not show...

    Hi, all. I was working on this and I thought I finally figured it out but when I ran this program what it did is to output blank lines. This is confusing...
    OK, so I got a class called MyString...
  16. Replies
    5
    Views
    1,103

    no. Should I? ----------- Well, I tried that...

    no. Should I?

    -----------
    Well, I tried that too. It compiles fine, but when I run the program it displays a blank line where the MyString vars (from People class) should go.
    I tried to do...
  17. Replies
    5
    Views
    1,103

    Maybe I am doing that wrong, but now the compiler...

    Maybe I am doing that wrong, but now the compiler lists << as no match again...
    What I was thinking, maybe it has a problem with the return type of getName() and getAddress()...... It is MyString. ...
  18. Replies
    5
    Views
    1,103

    How do I do that?

    I wrote a class called MyString. It uses NTS string, c-style. Basically consists of constructors, copy constructor and destructor. Nothing else.
    I also wrote another class, called People.

    ...
  19. Replies
    10
    Views
    1,815

    It is Object-Oriented Programming in C++ by...

    It is Object-Oriented Programming in C++ by Johnsonbaugh and Kalin. Example 3.7.4 on p. 154 (the top of page. Later they modify that without explaining why they leave out the "const")
  20. Replies
    10
    Views
    1,815

    So the book is wrong then.

    So the book is wrong then.
  21. Replies
    10
    Views
    1,815

    OK... that sounds reasonable. Does most of...

    OK... that sounds reasonable. Does most of compliers give errors at this point? Or is it only Dev?
  22. Replies
    10
    Views
    1,815

    confused: static method const???

    I'm working on this program and is such a slow progress, I keep stumbling on so small things... Like this one. My textbook is showing a class with private static int, and a public static method which...
  23. Replies
    3
    Views
    1,244

    Pheeew. That's a relief. :D Thanks a lot guys!

    Pheeew. That's a relief. :D Thanks a lot guys!
  24. Thread: basics

    by kocika73
    Replies
    9
    Views
    1,669

    Well, it is just an assignment and I am supposed...

    Well, it is just an assignment and I am supposed to know how to access certain members and whether I can at all. Just an exercise.
    Thanks.
  25. Replies
    3
    Views
    1,244

    destructor question

    I've been searching for an answer here on the board about destructors. I found this

    Is that a reason why my destructors are called twice?
    I have a base class and a derived class. I construct 3...
Results 1 to 25 of 99
Page 1 of 4 1 2 3 4