Search:

Type: Posts; User: Non@pp

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,904

    Thanks Tonto you cleared all that up for me. How...

    Thanks Tonto you cleared all that up for me. How would you have done this if you were given the problem, and why would you do it that way? I am still learning, and I want to know the right way to...
  2. Replies
    10
    Views
    1,904

    Okay I fixed the remove method to look like this ...

    Okay I fixed the remove method to look like this


    char* remove(char *str, char c)
    {
    char *space = new char[strlen(str) + 1];
    char *str2= space;

    while(*str != '\0')
    {
  3. Replies
    10
    Views
    1,904

    No I am supposed to return another string that...

    No I am supposed to return another string that contains the proper output. The original string should remain unchanged.
  4. Replies
    10
    Views
    1,904

    When I return my new string I am getting a trash...

    When I return my new string I am getting a trash value that is not useful.
  5. Replies
    10
    Views
    1,904

    There are some constraints that I can not remove...

    There are some constraints that I can not remove on the code. The pointers can not be removed.
  6. Replies
    10
    Views
    1,904

    String Remove problem

    I am trying to make a function that takes a string and removes all occurences of a specified character then returns the new string. The code I wrote generates an error, and I am having no luck...
  7. Replies
    10
    Views
    8,940

    But references can only have one alias right? ...

    But references can only have one alias right? Meaning after they become referenced to another object they cannot be referenced to another object. I think pointers don't have this limitation. Let...
  8. Replies
    10
    Views
    8,940

    Well I already know that pass by value isn't good...

    Well I already know that pass by value isn't good except for when I am passing small variables around that I don't want the called function to change. I am only curious of the performance...
  9. Replies
    7
    Views
    2,098

    Inheritance in c++

    Could someone please help me better understand inheritance in c++. I would like to know the differences between public, protected, and private inheritance. Also, I would like to better understand...
  10. Replies
    10
    Views
    8,940

    If I am passing a large vector structure that...

    If I am passing a large vector structure that contains classes that I created, then which way of passing parameters would I use? I am guessing it doesn't matter. Would accessing elements of the...
  11. Replies
    10
    Views
    8,940

    Pass by reference vs pass by pointer

    What is the difference between these two alternatives? Are there performance tradeoffs? Any help appreciated. Examples below.



    //Pass by pointer

    void negate(int * pn)
    {
    *n=-*n;
    }
Results 1 to 11 of 11