CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: BanKuZ

Search: Search took 0.04 seconds.

  1. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    Thanks anyway, you still helped a lot.
  2. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    Can you help me with it? I tried several ways but couldn't make it work.
  3. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    Well it is, and I think you're probably right. I just want to be 100% positive I'm not missing anything before I do tell them such an answer.

    Thank you very much, you've been very helpful.
  4. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    I tried to deference it twice, I didn't manage to do it.
    And it is something like homework only it was given by a C++ professional.
  5. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    I agree with your answer, but I'm trying to build a class for a given main() function.
    I'm trying to make to code given to me work correctly even if there are many other and better ways of coding...
  6. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    I already did most of it in my code. I understand you are trying to help and it seems you have a lot of knowledge. I know the right way of doing it is what you all suggested, and I will change it....
  7. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    Tried it, didn't work. Can you please write the code lines so I'll find out if I did it the way you meant?


    Changed, thanks.


    Thank you, I will make those changes as soon as my program runs...
  8. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    Can you specify what to write instead?


    O.K I appreciate it, I don't know either that's why I asked.

    Is there a way to use conversion cast for casting from Mystring* to char*?
    Like if I have...
  9. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    class Mystring {

    public:

    char s[MAX_SIZE];

    Mystring(){}

    Mystring (const char* str)
    {
  10. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    HI GCDEF,

    The main function is a given, that's the only reason I need a **.
    I didn't have any problem for not having a memory allocation for the internal char* why is it important? should I add...
  11. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    Here is the relevant part of the main function:

    int main (void) {

    Mystring* p = new Mystring();

    *p = "aaa";
    Mystring** pp =p;
    Print(*pp);//defined as Print(char*);...
  12. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Re: Class design

    Thank you,
    But that's exactly my problem,
    For the first one I'm trying to avoid changing any lines in the main function (since it was given to me).
    And for the second one I can't use the MyString...
  13. Thread: Class design

    by BanKuZ
    Replies
    27
    Views
    23,090

    Class design

    Hi all, I have this class in my code:
    class Mystring {
    public:
    char *s;
    Mystring(const char *);
    Mystring();
    ~Mystring(){}

    Mystring operator=(const char* str)
    ...
Results 1 to 13 of 13





Click Here to Expand Forum to Full Width

Featured