Search:

Type: Posts; User: trongsi

Search: Search took 0.00 seconds.

  1. Replies
    8
    Views
    1,434

    Actually, I didn't test this program, just...

    Actually, I didn't test this program, just wondered when I was looking at the way it works as the sample represented above. I am not similar with C code (scanf, printf,...), that was why I haven't...
  2. Replies
    8
    Views
    1,434

    So would you please explain why doesn't it stop...

    So would you please explain why doesn't it stop calling itself after received 'z' ? when user entered 'z' as input, the program would meet the base case's condition, how come it lets us enter the...
  3. Replies
    8
    Views
    1,434

    Is there something weird with this program ? Why...

    Is there something weird with this program ? Why doesn't it stop when it gets 'z' as the base case. Here we see the program let user enter the character 'r' after it received 'z'. What is wrong with...
  4. Replies
    26
    Views
    2,079

    So, int a[4][3], the last element is a[3][2]....

    So, int a[4][3], the last element is a[3][2].
    When i =3, j = 2, *(&a[0][0] + 4*3 + 2) => *(&a[0][0]+14) = exceeds the array.
    I think that it's correct if we modify it as following : a[i][j]...
  5. Replies
    10
    Views
    1,286

    Thank Salem, I'll go through this vague concept...

    Thank Salem, I'll go through this vague concept by studying more.
    Thank you all.
  6. Replies
    10
    Views
    1,286

    Thanks all for your help. To Salem,

    Thanks all for your help.
    To Salem,


    <---- and the result will be 1 file merged by 2 files above, or 2 files re-rorted ? If it's 1 file, so we will encounter the memory overflow as the problem I...
  7. Replies
    10
    Views
    1,286

    Nobody helps me out :( . Is something wrong...

    Nobody helps me out :( . Is something wrong with my question ?
  8. Replies
    2
    Views
    1,133

    int main() { vector ratings(5); ...

    int main()
    {

    vector<int> ratings(5);

    for(int i=0; i<5; i++)
    {
    cout<< "enter rating:";

    cin >> ratings[i]; // last '\n' is stored on the buffer
  9. Replies
    10
    Views
    1,286

    The point is that when we read a part of the...

    The point is that when we read a part of the file, say 1000 / 5000 nodes, and sort that part, and so we repeat that step for 4 other parts. The result we have will be 5 sorted segments of one file,...
  10. Replies
    10
    Views
    1,286

    How to deal with memory...

    Hi every body,
    Suppose that someone created a linked list with say some thousands nodes, and he saved those list as a file.
    Assume that my computer is poor of resource, and its memory can not...
  11. Replies
    2
    Views
    844

    [QUOTE=chasingxsuns]this is my program----------...

    [QUOTE=chasingxsuns]this is my program----------



    rectangle::rectangle(int length, int width)
    {
    int itslength=length; //you declared a new local variable
    int itswidth=width; //the same...
  12. Replies
    41
    Views
    6,254

    They are all run by drivers, fed with gas, and,...

    They are all run by drivers, fed with gas, and, most important, their brands are on the way declining to bankrupt. :) is that similar enough ? j/k
  13. Replies
    7
    Views
    1,934

    Yes, I agree with you. Supporting for the first...

    Yes, I agree with you. Supporting for the first style seems not very persuadable (just my opinion).
  14. Replies
    9
    Views
    2,261

    Yes, that was what I based on that to create this...

    Yes, that was what I based on that to create this class. I do understand you. The one I based on was:

    - A structure (or even a class) that defines the nodes' framework
    - A Stack class that do the...
  15. Replies
    9
    Views
    2,261

    Thank you all for your advisings. But my...

    Thank you all for your advisings.
    But my question was can I have a correct destructor for this class ? I mean, assume if we just let the user enter the nodes for stack without using them (so they're...
  16. Replies
    9
    Views
    2,261

    Thank you, but I've been learning C++, so I want...

    Thank you, but I've been learning C++, so I want to understand and practice the part I've just learned.
  17. Replies
    9
    Views
    2,261

    Need Help with Stack

    Hi everybody,
    My Stack class here is used to performance a simply task of stack. I modified this class from another that has 2 parts, one is a structure making up the frame of the list's nodes , and...
  18. Yes yes, You're so right. I made some mistakes...

    Yes yes, You're so right. I made some mistakes when I posted these code. However, I meant that those function work exactly alike, don't them ?
    Thanks all for your helping.
  19. Well, Thanks Dave_Sinkula. Are following...

    Well, Thanks Dave_Sinkula.

    Are following definition of Overloading Operator Assignment equivalent ?
    Why must the second one's return type be MyClass&, not MyClass ? What does it mean with that...
  20. Thanks for your reponses, back to the first...

    Thanks for your reponses, back to the first question, why does C++ require the copy constructor and overloading assignment operator having call-by-reference parameter. Is the reason I listed above...
  21. Question about Copy Constructor and Overloading Assignment Operator

    Hi everbody,
    I'm self-studying C++, so there are some points confusing me. Please help me make it clear:

    Consider this Copy Constructor Declaration:
    MyClass(const MyClass& myObj);

    Why must a...
  22. Thanks for your helps. I've just figured out the...

    Thanks for your helps.
    I've just figured out the problem.
    Since I have nearly no experience with C++, I compiled the implementation file & the app file separately, then opened the app file to run,...
  23. interface, implementation, & application files

    Hi all,
    This program works well. The the object of data type of class used to count something.
    However, the compiler generated the error when I broke this program into 3 parts:
    - The interface...
  24. Yes, Yes, Yes, I got it. Thank you so much. So,...

    Yes, Yes, Yes, I got it. Thank you so much.
    So, if I want to do so, I must place the argument for mediate(record& student) function, is it correct.
    I'm appriciated.



    /* Solved problem
    BIG...
  25. Need Help for Retrieving Value of an Private Member Variable of a Class.

    This code doesn't work as I expect. The return value of privte member variables are always garbage . :confused: :confused: :confused:
    Can every body help me out !
    Thanks in advandce.



    /*...
Results 1 to 25 of 25