Dark_Necros's Profile User Rating: -----

Reputation: -7 Shunned
Group:
Active Members
Active Posts:
253 (0.11 per day)
Joined:
29-May 09
Profile Views:
6,664
Last Active:
User is offline Jul 04 2014 12:16 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   Dark_Necros !!!

Posts I've Made

  1. In Topic: [Q] I'm struggling a little with pointers

    Posted 28 Dec 2013

    View PostCTphpnwb, on 28 December 2013 - 11:43 PM, said:

    You're outputting the address of the object. Look at this example:
    #include <iostream>
    
    class example {
    	int number;
    public:
    	example()
    	{
    		number = rand() % 100;
    	}
    
    	int get_num()
    	{
    		return number;
    	}
    };
    
    int main()
    {
    	example *test[5];
    
    	for (int i = 0; i < 5; i++) {
    		test[i] = new example;
    		std::cout <<test[i]->get_num() << "\t" << test[i] << std::endl;
    	}
    
    	return 0;
    }
    


    It's not the output that I'm particularly interested in. I understand that it's the address of the object. That's what is intended for those lines. I'm interested in copying the address from one pointer to another. I'd like both myArray[0] and myArray[1] to point to the exact same object. I can't tell if that's what is happening here, because the address that is printed when I look at myArray[0] is different from the address that is printed by myArray[1].
  2. In Topic: [ncurses] Simple do...while not acting as expected. I'm curious wh

    Posted 15 Nov 2013

    Essentially I'm trying to accept a set of coordinates for a game. It requests again if the coordinates are out of bounds.

My Information

Member Title:
D.I.C Regular
Age:
21 years old
Birthday:
September 26, 1993
Gender:
Location:
United States
Full Name:
Landon R. Brainard
Programming Languages:
C++

Contact Information

E-mail:
Click here to e-mail me
Website URL:
Website URL  http://redshyft.com
Skype:
Skype  brainard52
Facebook:
http://www.facebook.com/DarkNecros

Friends

Comments

Dark_Necros has no profile comments yet. Why not say hello?