Results 1 to 4 of 4
  1. #1
    Gab's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,716
    Reputation
    1755
    Thanks
    1,543

    [Help]2 Questions

    1.

    Is there a function to delete the program once it have been ended?

    Example:
    Code:
    #include <iostream>
    
    using namespace std;
    
    int main();
    {
           cout << "Test" << endl;
           AutoDelete; //False function
           return 0;
    }
    Is there a function similar to AutoDelete?

    2.

    Why in an operator= we need to return this?

    example :

    Code:
    Duree Duree::operator=(const Duree &duree)
    {
        // code
    
        return *this;
    }
    Thank u

  2. #2
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love

    For number 1.
    system("del *path of program here*");


    For number 2.

    im pretty sure you wouldnt have to use that if you didnt make such a simple mistake

    [php]#include "Duree.h"

    Duree:uree(int heures, int minutes, int secondes)
    } //<---------WTF
    m_heures = heures;
    m_minutes = minutes;
    m_secondes = secondes;

    if (m_secondes >= 60)
    {
    while (m_secondes >= 60)
    {
    m_seconde -= 60;
    m_minutes += 1;
    }

    }

    if (m_minutes >= 60)
    {
    while (m_minutes)
    {
    m_minutes -= 60;
    m_heures += 1;
    }

    }

    }
    [/php]

    未来が見えなくて怖いから
    未来が見えてしまって悲しいから
    目を閉じて優しい思い出に浸ってしまう




  3. #3
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    653
    Reputation
    70
    Thanks
    1,157
    My Mood
    Bitchy
    1. No, you can't because the system can't delete a file in use.
    2. So that you can do:
    Code:
    Duree d1;
    Duree d2;
    Duree d3 = d2 = d1;

  4. #4
    Gab's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,716
    Reputation
    1755
    Thanks
    1,543
    Quote Originally Posted by Kallisti View Post

    For number 1.
    system("del *path of program here*");


    For number 2.

    im pretty sure you wouldnt have to use that if you didnt make such a simple mistake

    [php]#include "Duree.h"

    Duree:uree(int heures, int minutes, int secondes)
    } //<---------WTF
    m_heures = heures;
    m_minutes = minutes;
    m_secondes = secondes;

    if (m_secondes >= 60)
    {
    while (m_secondes >= 60)
    {
    m_seconde -= 60;
    m_minutes += 1;
    }

    }

    if (m_minutes >= 60)
    {
    while (m_minutes)
    {
    m_minutes -= 60;
    m_heures += 1;
    }

    }

    }
    [/php]
    I know ^^

    But plz Why a

    Code:
    return *this;
    ??

Similar Threads

  1. How to glitch { help } { question }
    By Jaycheezy in forum CrossFire Glitches
    Replies: 10
    Last Post: 04-25-2010, 04:31 AM
  2. [Help] Question in photoshop...
    By ericrud in forum Combat Arms Mod Discussion
    Replies: 4
    Last Post: 04-25-2010, 01:44 AM
  3. [Help] Question on Glitching
    By X David X in forum CrossFire Glitches
    Replies: 4
    Last Post: 04-13-2010, 02:10 AM
  4. [HELP/QUESTION] About the vip
    By Koto in forum Combat Arms Help
    Replies: 5
    Last Post: 02-27-2010, 07:10 AM
  5. [Help/Question] Cheetah Injector 1.4
    By aymendude0 in forum Combat Arms Hacks & Cheats
    Replies: 3
    Last Post: 04-29-2009, 04:18 PM