Search:

Type: Posts; User: Zeus_

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    20
    Views
    433

    EDIT 2: Nevermind, I got it to work ;)...

    EDIT 2:

    Nevermind, I got it to work ;) Templates look stupid when you code them but it's a very very smart way and the tiniest of mistake screws them up. I realised what I was doing brutally wrong...
  2. Replies
    20
    Views
    433

    Hey, I'm having a lot of difficulty understanding...

    Hey, I'm having a lot of difficulty understanding template specialization when trying to implement something. Here's the code:



    friend std::ostream& operator << <> (std::ostream& Stream , const...
  3. Replies
    20
    Views
    433

    Yeah, all that is there, but it was never my...

    Yeah, all that is there, but it was never my intention to make it work for every user-defined type. All I wanted to do was make a simple tool for myself that helps with debugging while competing in...
  4. Replies
    20
    Views
    433

    I think I got it to work, something like what I...

    I think I got it to work, something like what I mentioned.... Turns out it's not that impossible :)

    I've been thinking really hard about this for the past few days and remember when I asked "Are...
  5. Apart from everything that John points out (yep,...

    Apart from everything that John points out (yep, it's crap), if all you want to do is print a lowercase letter in uppercase, subtract the value 32 from it and then print it.

    So, let's say, you...
  6. Replies
    4
    Views
    107

    Bold of you to assume someone else will run your...

    Bold of you to assume someone else will run your code for you so that they can figure out what's wrong with it and post the errors and solutions to you in a more presentable way when all you did is...
  7. Replies
    3
    Views
    97

    Remember static variables taught to you in class?...

    Remember static variables taught to you in class? No?

    > corresponding member of string s

    Don't you mean integer array s?
  8. Replies
    3
    Views
    90

    Exception safe assignment – Vorbrodt's C++ Blog...

    Exception safe assignment – Vorbrodt's C++ Blog

    You delete after you copy so that if the copy assignment throws an exception, no change occurs or affects your original variable.

    EDIT:

    Looked...
  9. Replies
    4
    Views
    121

    > I dont think there is a problem with sharing...

    > I dont think there is a problem with sharing resources for learning instead of pointing to google.

    Lol, there sure is a problem. Research is what drives learning, self-learning to be precise....
  10. Replies
    13
    Views
    269

    Thanks for all the help!

    Thanks for all the help!
  11. Replies
    4
    Views
    121

    Lol:biggrin: Google search has it all....

    Lol:biggrin:

    Google search has it all....
  12. Replies
    13
    Views
    269

    Changed the code to this but realised midway that...

    Changed the code to this but realised midway that this would reverse the order of the Stack. Then thought, I could exploit my [] overload to push Other in reverse order so I can get it to be what is...
  13. Replies
    13
    Views
    269

    Yep, I see the problem with the copy ctor and...

    Yep, I see the problem with the copy ctor and assignment operator now when I test it. Right now, it's pretty much doing what a typedef would do i.e. creating an alias. I'll fix that. Thanks for your...
  14. Replies
    13
    Views
    269

    This is the code I've got till now. TODO: -...

    This is the code I've got till now.

    TODO:
    - Remove Copy Ctor and Copy Assignment Operator once I know the reason why it's bad (I'm taking a few random guesses but I'm definitely sure)
    - Modify...
  15. Replies
    13
    Views
    269

    Yeah, I figured. It's a bad idea. I'm modifying...

    Yeah, I figured. It's a bad idea. I'm modifying all my programs so that I can use them instead of the STL for practicing purposes and hobby projects. Thought it'd be a good idea to overload [] (I...
  16. Replies
    13
    Views
    269

    This is my operator overload for retrieving the...

    This is my operator overload for retrieving the element data of the i'th element. It's probably very inefficient for accessing the millionth element or something like that. What do you guys think I...
  17. Replies
    34
    Views
    410

    Lol, if that's the truth, RIP the 94 people (in...

    Lol, if that's the truth, RIP the 94 people (in the PCMC stream) who've learnt Bubble and Insertion sort at school and the thousands, probably millions of people, referring to GeeksforGeeks.
    F
  18. Replies
    34
    Views
    410

    > That is not bubble sort, it's insertion sort. ...

    > That is not bubble sort, it's insertion sort.

    I'm pretty sure that that is bubble sort. I looked up through three references after you said that and I can tell for sure that it is not insertion...
  19. Replies
    34
    Views
    410

    See #4. You're missing a % before 'ist'

    See #4. You're missing a % before 'ist'
  20. Replies
    34
    Views
    410

    What's your input? (1,2,3,4,5) ? If that's the...

    What's your input? (1,2,3,4,5) ? If that's the case, and you want 5,4,3,2,1, you need to change the > in if statement to <

    > printf("\nDas ist der %i. Wert bei der sortierung: %i", e + 1, e + 1,...
  21. Replies
    34
    Views
    410

    void BubbleSort (int* Array , int Size) { ...

    void BubbleSort (int* Array , int Size)
    {
    int i , j , Temp;
    bool SwapOccurred;

    for (i = 0; i < Size - 1; i++)
    {
    SwapOccurred = false;
    ...
  22. Replies
    34
    Views
    410

    I think your bubble sort is wrong... Ascending...

    I think your bubble sort is wrong...

    Ascending order bubble sort:


    void BubbleSort (int* Array , int Size)
    {
    int Temp; // int ctr = 0

    for (int i = 0; i < Size; i++)
  23. Replies
    12
    Views
    163

    Oh, cool! The STL just got more interesting to...

    Oh, cool! The STL just got more interesting to me. It's a brilliant solution tbh and yeah, I always wondered why the capacity was not 0 when I learnt vector for the first time. Makes a lot more sense...
  24. Replies
    8
    Views
    216

    I mean, you'd usually have an other.c file along...

    I mean, you'd usually have an other.c file along with the other.h to contain the implementation details. So, when you include other.h that's added into project files, the correct linking occurs with...
  25. Replies
    12
    Views
    163

    Thanks, I thought so though. So, does that mean...

    Thanks, I thought so though. So, does that mean that it just re-writes over the already allocated memory? Cuz if that's so, then it's probably a brilliant idea.
Results 1 to 25 of 203
Page 1 of 9 1 2 3 4