GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Tue Aug 23, 2016 9:04 pm

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: 'cout' is not a member of 'std'?
PostPosted: Thu Sep 29, 2005 4:40 pm 
Familiar Face

Joined: Thu Sep 22, 2005 12:23 pm
Posts: 20
When trying to compile the below program, I get a message saying that 'cout' is not a member of 'std', what the heck is that message for?!

Is this a bug in g++


#include <gtkmm/button.h>
#include <gtkmm/window.h>
#include <gtkmm/main.h>
#include <string>

class HelloWorld : virtual public Gtk::Window{
virtual ~HelloWorld();

//Signal handlers:
virtual void on_button_clicked();

//Member widgets:
Gtk::Button m_button;
// creates a new button with the label "Hello World".
HelloWorld::HelloWorld() : m_button("Hello World"){

// Sets the border width of the window.

// When the button receives the "clicked" signal, it will call the
// on_button_clicked() method. The on_button_clicked() method is defined below.
m_button.signal_clicked().connect(sigc::mem_fun(*this, &HelloWorld::on_button_clicked));

// This packs the button into the Window (a container).

// The final step is to display this newly created widget...;

/* ?????????????????????? HERE IS THE PROBLE ????????????????? */
void HelloWorld::on_button_clicked(){
std::cout << "Hello World" << std::endl;

int main (int argc, char *argv[])
Gtk::Main kit(argc, argv);

HelloWorld helloworld;
Gtk::Main::run(helloworld); //Shows the window and returns when it is closed.

return 0;

* You cannot exercise your power to a point of humiliation.
- Jean Chretien

* It's amazing how the small seeds of distrust and misunderstanding
can yield a crop of hate and death...

Ma'assalama! Adiós! bye!

 Post subject:
PostPosted: Thu Sep 29, 2005 5:03 pm 
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
You need to include <iostream>...

Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group