[gtkmm] Subject: possible bug in Gtk::Main kit
- From: kmilo softhome net
- To: gtkmm-list gnome org
- Subject: [gtkmm] Subject: possible bug in Gtk::Main kit
- Date: Fri, 16 Jan 2004 16:52:43 -0700
the first time the function ayudar run fine, but the second time (after
Gtk::Main kit) ayudar print bad the file
#include <gtkmm.h>
#include <iostream>
#include <fstream>
void ayudar(){
char* buffer=NULL;
int tamanoBytesFname=0;
std::ifstream file ("help.txt");
file.seekg (0, std::ios::end);
tamanoBytesFname = file.tellg();// obtiene el tamano del archivo
file.seekg (0, std::ios::beg);
buffer = new char [tamanoBytesFname];
file.read(buffer,tamanoBytesFname); // lee el archivo de ayuda
file.close();
std::cout << buffer << std::endl << std::endl;
delete[] buffer;
}
int main(int argc, char *argv[]) {
ayudar();
Gtk::Main kit(argc, argv);
ayudar();
std::cin.get();
return 0;
}
I'm ussing gtkmm in windows following the instructions from here:
http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ape.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]