LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-28-2015, 09:34 AM   #1
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 113

Rep: Reputation: 1
still get warning after upgrading to g++ 4.9


Hello. I thought I was upgrading to C++11 when I upgraded g++ to 4.9 but I still get this error:
Code:
warning: non-static data member initializers only available with -std=c++11
I created a class Dog that inherits from class Animal the difference being that Dog has:
Code:
class Dog : public Animal{

private:
    string sound = "Woof";
I've confirmed my version is 4.9 with g++ --version

something else to do?
 
Old 03-28-2015, 09:44 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Have you tried setting "-std=c++11" in your compile command?
 
Old 03-28-2015, 10:56 AM   #3
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 113

Original Poster
Rep: Reputation: 1
Ok that worked. Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Warning when upgrading: installed deb package through website JosephS Linux - Software 3 01-26-2011 10:57 AM
Display Driver Warning when upgrading to 10.04 LTS. hell_rider Ubuntu 1 10-16-2010 08:04 AM
LXer: Upgrading your distro should come with a warning LXer Syndicated Linux News 0 05-05-2010 07:20 PM
Libtool link warning when upgrading pango jrdioko Linux - Software 0 01-19-2006 05:57 PM
Warning message during upgrading KDE 3.1.3 to 3.1.4 NewtoSlack Mandriva 2 10-07-2003 08:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration