Search:

Type: Posts; User: byebyebyezzz

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    791

    Pointer problem

    so I have



    class A{

    public:
    draw(){
    cout<<"hello";
    }
  2. Replies
    1
    Views
    1,073

    nvm. I got it fixed. the problem was somewhere...

    nvm. I got it fixed.
    the problem was somewhere else .
  3. Replies
    1
    Views
    1,073

    Program crashed

    MNode::MNode(CMenuItem* item,unsigned int index, MNode* prev, MNode* next ){
    _next = next;
    _prev = prev;
    _item = item;
    _index = index;
    }


    CMenu& CMenu::add(const char* Text, bool selected){...
  4. Replies
    9
    Views
    970

    I fixed the porblem. (the problem was with my...

    I fixed the porblem. (the problem was with my team member's code)
    It's working fine now.
    Thanks all
  5. Replies
    9
    Views
    970

    I think my syntax is correct. The problem...

    I think my syntax is correct.
    The problem probably lie on what actually inside data ><.
  6. Replies
    9
    Views
    970

    this is what I have to do create : operator...

    this is what I have to do

    create :
    operator char*();

    Overload the char* cast to return the value of _Label.data()

    _Label.data() return a void* type.

    so what I did was
  7. Replies
    9
    Views
    970

    data is void* type

    data is void* type
  8. Replies
    9
    Views
    970

    Help with overloa casting operator

    I have



    void* classname::data(){ //this function works fine
    return data;
    }

    classname::operator char*(){ //this one cause the program to crash
    return (char*)(data());
  9. Replies
    12
    Views
    1,139

    well this what I did and it worked char s[2] ...

    well this what I did and it worked

    char s[2]

    s[0] = c[0];
    s[1] = '\0';

    I wouldnt come up with that w/o you

    thanks
  10. Replies
    12
    Views
    1,139

    could you tell me more on how can I prepend '('...

    could you tell me more on how can I prepend '(' to a null terminated string?

    thanks :)
  11. Replies
    12
    Views
    1,139

    The display function isnt that simple. There are...

    The display function isnt that simple. There are other parameters that I didnt mention here.
    I need to use that display function to display something like
    (hello world)
    where...
  12. Replies
    12
    Views
    1,139

    well I wish it could be done that easily. This...

    well I wish it could be done that easily.
    This is a part of my assignment.
    The display function is already in used to print a null terminated string.
    I cant modify the display function.
    I cant...
  13. Replies
    12
    Views
    1,139

    oh it continues with the code I have in the 1st...

    oh it continues with the code I have in the 1st post.


    char c[6]={"hello"};
  14. Replies
    12
    Views
    1,139

    Thx it works but it doesnt at the same time. I...

    Thx it works but it doesnt at the same time.

    I have this



    display(const char *str){
    cout <<str;}

    at first, I couldnt pass c[0] or c[1] because they are const char so I thought it would...
  15. Replies
    12
    Views
    1,139

    pointer question

    char c[6]={"hello"};

    void* data;

    data=c;



    Is there any way I can get c[4] or c[3] by using data?
    I tried cout<< (char*)data[4]; but it doesnt work.
  16. Thread: Help

    by byebyebyezzz
    Replies
    5
    Views
    958

    I am getting this error: IntelliSense: no...

    I am getting this error:

    IntelliSense: no default constructor exists for class "A"

    I am getting this error because I dont have an empty constructor for class A?
  17. Thread: Help

    by byebyebyezzz
    Replies
    5
    Views
    958

    Maybe I typed something wrong in my code but that...

    Maybe I typed something wrong in my code but that what I did initially but I have an error. Now I retyped it, it works lol

    Thanks.
  18. Thread: Help

    by byebyebyezzz
    Replies
    5
    Views
    958

    Help

    I have


    class A{
    ...
    A(int x,int y){
    }
    ...
    }
  19. thank you

    thank you
  20. Can someone explain why the double quotes give me error here?

    #include "dot.h"
    namespace dot {
    const char* leader(char* s){
    for (int i=0;i<ML;i++)
    s[i]=".";
    s[ML]="\0";
    return s;
    }
    }
  21. thank you!

    thank you!
  22. I need help passing conditional values to a base constructor.

    Hi everyone,

    Can someone tell me how can I pass conditional values to a base constructor?

    let say I have


    class Base{

    Base(int a, int b, int c){
  23. Replies
    1
    Views
    1,786

    Help with switch case

    switch(c)

    case 'a':

    cout <<"hello";

    case 'b':

    cout << "hello";
  24. Replies
    5
    Views
    947

    I need help

    I have this function


    str[10]="ABCDEFGHJI";
    int strOffset;

    display(str+strOffset);


    I just want to know what happen if strOffset is greater than 10. What will be pass to the display...
  25. thank you

    thank you
Results 1 to 25 of 51
Page 1 of 3 1 2 3