Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Keyeszx

Pages: [1]
1
General / Re: What exactly is this doing?
« on: May 07, 2014, 04:26:31 am »
I wish it was that last one. I was asking a friend who's in that class right now. They've gone past the section and he never went over either initialization list or copy constructors.

2
General / Re: What exactly is this doing?
« on: May 03, 2014, 09:11:31 pm »
Thanks. I've actually been looking through my C++ book I used when I took a class 2 years ago. I found the chapter that goes over the initialization list but I don't remember going over it 2 years ago. Like it's right after overloading constructors which I do remember. There's also the copy constructor, which I don't remember.

So I'm guessing either my professor skipped that, went over it so briefly that it didn't stick, or I missed class and forgot to read the book that the lecture went over.

3
General / What exactly is this doing?
« on: May 03, 2014, 08:10:41 pm »
So I'm following the SFML Game Dev book and I've learned the basic of C++. But I don't know what it's doing with the constructor really. Specifically, the mWindow and mPlayer right after the constructor. Why can't those be called in the constructor, why is it outside? It works and all but I would like to know why it works and what is it.

Game::Game()
        : mWindow(sf::VideoMode(630, 380), "SFML")  //What is this and the line below it?
        , mPlayer()
{
        player.setRadius(40.f);
        player.setPosition(100.f, 100.f);
        player.setFillColor(sf::Color::Blue);
}

Why doesn't this work?
Game::Game()
{      
    mWindow(sf::VideoMode(630, 380), "SFML");
        mPlayer();
        player.setRadius(40.f);
        player.setPosition(100.f, 100.f);
        player.setFillColor(sf::Color::Blue);
}

4
SFML projects / Re: 'Tiled' Tile-map Loader
« on: December 19, 2013, 01:07:30 am »
If I wanted to use the Tiled editor to set points where say a chest would appear, the player spawns, or enemy spawns how would I do that? Would I use the object layer like you explained in the collision post?

Pages: [1]
anything