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

Reputation: -7 Shunned
Active Members
Active Posts:
253 (0.12 per day)
29-May 09
Profile Views:
Last Active:
User is offline Jul 04 2014 12:16 AM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:

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;
    		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.
  3. In Topic: [C++] Insignificant bug is driving me crazy

    Posted 16 Jun 2013

    View PostNickDMax, on 12 June 2013 - 06:55 AM, said:

    next you use arrays which is not the best C++ practice. Arrays are more of a low-level operation in C++. Typically one would use a std::vector or (C++11) a std::array at the very least.

    I think I learned how I could initialize the array dynamically.
    constexpr int n()
        return 10;
    double a[n()]; // n() is a compile time constant expression

    I got that from here.
  4. In Topic: [C++] Insignificant bug is driving me crazy

    Posted 12 Jun 2013

    View Postjimblumberg, on 12 June 2013 - 10:21 PM, said:

    Then you should try to learn them, the sooner the better. Here's a couple of links to get you started: Data structures, Classes I and Classes II


    Thanks for these. I'll get on them asap.

    Sent from my SCH-I535 using Tapatalk 2


    View PostSarumanTheWhite, on 12 June 2013 - 10:55 PM, said:

    I managed to get the output looking right by replacing the << ".\n"; with << endl; although this is probably only masking the potential larger issues at hand.

    I'll keep this in mind. Why would it make any difference, though? Isn't endl just a '\n' in a variable? I looked it up, and the reason it fixes things is because it flushes the stream.
  5. In Topic: [C++] Insignificant bug is driving me crazy

    Posted 12 Jun 2013

    View Postjimblumberg, on 12 June 2013 - 08:33 PM, said:


    As with vectors, I had yet to learn classes. That was going to be the next thing that I learn after sequential access files.

    What about structures. Many times using a structure or class to hold the items being read from a file is a great help in keeping things simple.


    As with vectors and classes, I understand what they are, but not how they're implemented in C++.

My Information

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

Contact Information

Click here to e-mail me
Website URL:
Website URL  http://redshyft.com
Skype  brainard52



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