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.


Topics - supermoneylife

Pages: [1]
1
General / unique_ptr help
« on: January 18, 2015, 02:14:45 am »
Ive been trying to teach myself programming in C++. I have some experience of making a few full games in XNA but as you probably know, XNA makes everything fairly simple where you can just start adding objects immediately.

Anyway, I am following the tutorial book: SFML Game Development SFML 2.0 (However I am using SFML2.2 and VS2013 - hope this will be ok!)

I am stuck on the 2nd Chapter (I must admit I'm finding this book the most helpful Ive seen but much of it is left to me knowing where to put things like variables etc. and they don't really explain properly about adding classes to the project - together with headers etc - so I have been fairly confused the whole time and currently have the whole 'game' running from 'main.cpp' without any other classes or files.

The start of the 2nd chapter describes how I must use std::unique_ptr to create a class designed to handle loading of textures. (I realise the std library is not part of SFML, but Im hoping someone here can/will help me). When I try to implement this I get error: "std has no member 'unique_ptr' "

There is "unique_copy" but this looks like its something completely different.

I'm gutted as I was just feeling like I was starting to build a good understanding of how the game fitted together within c++ and was very much enjoying working through that book :/

Is the code in the book correct for my IDE and version of SFML? Is it just me being an idiot? I'm lost now :(

Pages: [1]
anything