Results 1 to 2 of 2

Thread: Crashing Program (C++)

  1. #1
    abdullahaftab is offline Senior Member+
    Last Online
    27th December 2023 @ 09:56 PM
    Join Date
    16 Apr 2010
    Posts
    74
    Threads
    10
    Credits
    138
    Thanked
    2

    Default Crashing Program (C++)

    Why would this program crash ?

    void ChangePointer(int *p)
    {
    p = new int;
    *p = 10;
    }
    void CallChangePointer()
    {
    int *a = NULL;
    ChangePointer(a);
    *a = 1;
    }

  2. #2
    Shehzad Iqbal's Avatar
    Shehzad Iqbal is offline Advance Member+
    Last Online
    26th November 2023 @ 06:28 PM
    Join Date
    16 Jan 2009
    Location
    Karachi
    Gender
    Male
    Posts
    28,463
    Threads
    2271
    Credits
    11,705
    Thanked
    5385

    Default

    Moved From C++

Similar Threads

  1. program plz 4
    By PREMkhan in forum Ask an Expert
    Replies: 1
    Last Post: 25th May 2010, 11:53 PM
  2. Solved plz help me in the following c++ program
    By raza89 in forum Solved Problems (IT)
    Replies: 4
    Last Post: 19th October 2009, 08:29 AM
  3. Replies: 8
    Last Post: 19th May 2009, 05:51 PM
  4. Accounts ke lye program konsa hai.PLZ URGENT REPLY ME
    By babarali552889 in forum Solved Problems (IT)
    Replies: 3
    Last Post: 24th June 2006, 04:49 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •