samedi 28 février 2015

Class differences between C++03 and C++11

I'm current building an application in which I have a log function that is accessible in most of my classes which was declared as below



#ifndef FILENAME_H
#define FILENAME_H

#pragma once

#include "log.h"

class ClassName {
private:
log LogHandler;
}


This worked fine for a long time and then I wanted to include another function elsewhere in my application that was only compatible with C++11 so I told the compiler to compile to these standards. I was then receiving an error on "log logHandler" saying log is not a declared name.


I was able to resolve the problem by changing the line to



class log logHandler;


I was wondering if anybody could tell me what has changed between C++03 and C++11 that required me to do this?


Aucun commentaire:

Enregistrer un commentaire