dev-cpp-users Mailing List for Dev-C++ (Page 3)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(15) |
Oct
(115) |
Nov
(154) |
Dec
(258) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(377) |
Feb
(260) |
Mar
(249) |
Apr
(188) |
May
(152) |
Jun
(150) |
Jul
(195) |
Aug
(202) |
Sep
(200) |
Oct
(286) |
Nov
(242) |
Dec
(165) |
| 2002 |
Jan
(245) |
Feb
(241) |
Mar
(239) |
Apr
(346) |
May
(406) |
Jun
(369) |
Jul
(418) |
Aug
(357) |
Sep
(362) |
Oct
(597) |
Nov
(455) |
Dec
(344) |
| 2003 |
Jan
(446) |
Feb
(397) |
Mar
(515) |
Apr
(524) |
May
(377) |
Jun
(387) |
Jul
(532) |
Aug
(364) |
Sep
(294) |
Oct
(352) |
Nov
(295) |
Dec
(327) |
| 2004 |
Jan
(416) |
Feb
(318) |
Mar
(324) |
Apr
(249) |
May
(259) |
Jun
(218) |
Jul
(212) |
Aug
(259) |
Sep
(158) |
Oct
(162) |
Nov
(214) |
Dec
(169) |
| 2005 |
Jan
(111) |
Feb
(165) |
Mar
(199) |
Apr
(147) |
May
(131) |
Jun
(163) |
Jul
(235) |
Aug
(136) |
Sep
(84) |
Oct
(88) |
Nov
(113) |
Dec
(100) |
| 2006 |
Jan
(85) |
Feb
(119) |
Mar
(33) |
Apr
(31) |
May
(56) |
Jun
(68) |
Jul
(18) |
Aug
(62) |
Sep
(33) |
Oct
(55) |
Nov
(19) |
Dec
(40) |
| 2007 |
Jan
(22) |
Feb
(49) |
Mar
(34) |
Apr
(51) |
May
(66) |
Jun
(43) |
Jul
(116) |
Aug
(57) |
Sep
(70) |
Oct
(69) |
Nov
(97) |
Dec
(86) |
| 2008 |
Jan
(32) |
Feb
(47) |
Mar
(106) |
Apr
(67) |
May
(28) |
Jun
(39) |
Jul
(31) |
Aug
(25) |
Sep
(18) |
Oct
(25) |
Nov
(5) |
Dec
(21) |
| 2009 |
Jan
(33) |
Feb
(27) |
Mar
(27) |
Apr
(22) |
May
(22) |
Jun
(10) |
Jul
(17) |
Aug
(9) |
Sep
(21) |
Oct
(13) |
Nov
(4) |
Dec
(11) |
| 2010 |
Jan
(10) |
Feb
(8) |
Mar
(4) |
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(8) |
Oct
(26) |
Nov
(9) |
Dec
(1) |
| 2011 |
Jan
(21) |
Feb
(16) |
Mar
(4) |
Apr
(19) |
May
(26) |
Jun
(9) |
Jul
(6) |
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(2) |
Dec
(1) |
| 2012 |
Jan
(4) |
Feb
(7) |
Mar
(4) |
Apr
|
May
(1) |
Jun
(10) |
Jul
(1) |
Aug
(1) |
Sep
(18) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
| 2013 |
Jan
(4) |
Feb
(2) |
Mar
(15) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(4) |
Oct
|
Nov
(9) |
Dec
|
| 2014 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
(4) |
| 2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(9) |
Nov
(35) |
Dec
(6) |
| 2016 |
Jan
(7) |
Feb
(10) |
Mar
(10) |
Apr
(9) |
May
(13) |
Jun
(9) |
Jul
(1) |
Aug
(3) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(11) |
2
(17) |
3
(7) |
4
(12) |
|
5
(4) |
6
(11) |
7
(9) |
8
(5) |
9
(7) |
10
(2) |
11
(5) |
|
12
(1) |
13
(6) |
14
(1) |
15
(11) |
16
(4) |
17
(9) |
18
(6) |
|
19
(1) |
20
|
21
(14) |
22
(1) |
23
(6) |
24
|
25
|
|
26
|
27
(2) |
28
(1) |
29
(6) |
30
(9) |
31
(1) |
|
|
From: Daniel K. O. <dan...@ya...> - 2004-12-17 04:03:22
|
spiro harvey wrote: >can the web developers put this as a FAQ or in big red writing on the >download page? > This is already in the FAQ. But everybody can reach this mailing list without reading the FAQ. I suggested some time ago that this mailing list's address should be hidden *inside* the FAQ; so nobody could ask anything here before reading it. Daniel K. O. |
|
From: spiro h. <spi...@gm...> - 2004-12-17 03:12:40
|
> I just downloaded the latest Bloodshed IDE for C++ and > tried out a Hello World Program with a cout <<"Hello.. > ."; > When I tried to runt the program, the DOS window just > flashed once and disappeared. How can I look at the > output of my program? I tried looking the settings but > in vain. > Any help is appreciated, somebody shoot me. can the web developers put this as a FAQ or in big red writing on the download page? -- "Here's a bucket, go and kick it." -- Kill Yourself (Stormtroopers of Death) my life: http://spiroharvey.blogspot.com |
|
From: Kiran D. <kir...@ya...> - 2004-12-17 03:04:33
|
Hi All, I just downloaded the latest Bloodshed IDE for C++ and tried out a Hello World Program with a cout <<"Hello.. ."; When I tried to runt the program, the DOS window just flashed once and disappeared. How can I look at the output of my program? I tried looking the settings but in vain. Any help is appreciated, Thanks, Kiran __________________________________ Do you Yahoo!? Send a seasonal email greeting and help others. Do good. http://celebrity.mail.yahoo.com |
|
From: Per W. <pw...@ia...> - 2004-12-16 11:32:18
|
Since I use a text-only mail reader, I assumed the image was a screen-shot of some problem. Obviously not :) Besides the RTFM, it is always a good idea to supply some source + error messages when something isn't working as expected. Since we don't have the slightest idea about the problem, there really isn't much solutions we can help with. /Per W On Thu, 16 Dec 2004 ve...@wp... wrote: > > I can't get my program to open text files. I am extremely new and > > amusing the projects that come with DEV as a base, any tips? > > Omfg. Yeah. This is amusing. RTFM! > Don't ask THAT stupid questions here.. It's not the place for "heey > what tooo doo i'm a neeewb..". Use google instead.. Just check for > file operation functions. > > One more thing - read Netiquete! Dont send emails in html format! Or > just not here.. And signature with image? How amusing.. |
|
From: Pierre <pi...@sa...> - 2004-12-16 11:15:14
|
Hi. Have exactly the same problem with Dev-Cpp. Did you ever find a solution? I'm suspecting that the compiler does not support these #pragma settings. I've Googled around for days to find a solution, and even Microsoft says it should work (maybe they inplicitely mean: Works with VC++) |
|
From: <ve...@wp...> - 2004-12-16 10:28:03
|
> I can't get my program to open text files. I am extremely new and > amusing the projects that come with DEV as a base, any tips? Omfg. Yeah. This is amusing. RTFM! Don't ask THAT stupid questions here.. It's not the place for "heey what tooo doo i'm a neeewb..". Use google instead.. Just check for file operation functions. One more thing - read Netiquete! Dont send emails in html format! Or just not here.. And signature with image? How amusing.. |
|
From: Kindagreywolf <kin...@yv...> - 2004-12-16 02:47:35
|
I can't get my program to open text files. I am extremely new and am using the projects that come with DEV as a base, any tips? -- |
|
From: Per W. <pw...@ia...> - 2004-12-15 21:57:08
|
One more thing. If g_pIrcServerDataBase->currentNetwork() returns NULL,
you will never assign any value to your m_pSrv member within the
beConsole() constructor.
/Per W
On Wed, 15 Dec 2004, Black Eagle wrote:
> Hi guys!
>
> I got a problem at run time, when using a pointer in a function.
>
> The error is in the function KviIrcServer* server() at line : return m_pSrv;
>
> In all other functions I got no problem with this variable. It is another
> class that tries to call this function, it's the friendclass beChannel
>
>
> Here is the beConsole.h
>
> #ifndef BE_CONSOLE_H
> #define BE_CONSOLE_H
>
> #include "beMDIWindow.h"
>
> class KviIrcServer;
>
> class beConsole : beMDIWindow
> {
> friend class beIRC;
> friend class beChannel;
> Q_OBJECT
> public :
> beConsole(QWidget * parent = 0, const char * name = 0, WFlags f = 0);
> ~beConsole();
>
> KviIrcServer* server();
> protected :
> bool connectToServer();
> private slots :
>
> virtual void hostFound();
> virtual void connected();
> virtual void socketReadyRead();
> virtual void disconnected();
> void send(const QString & command);
> private :
> KviIrcServer * m_pSrv;
> // KviProxy * prx;
>
> QSocket * m_pQSocket;
> };
>
> #endif
>
> And here is the beConsole.cpp
> // beIRC stuff
> #include "beConsole.h"
> // kvirc stuff
> #define HAVE_CONFIG_H
> #include "config.h"
> #include <kvirc/3.0.1/kvi_app.h>
> #include <kvirc/3.0.1/kvi_ircserverdb.h>
> #include <kvirc/3.0.1/kvi_confignames.h>
> // QT Stuff
> #include <qregexp.h>
> #include <qsocket.h>
>
> extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase;
>
> beConsole::beConsole(QWidget * parent,const char * name, WFlags f) :
> beMDIWindow(parent,name,f)
> {
> m_windowType = beMDIWindow::Console;
>
> KviIrcNetwork * net = g_pIrcServerDataBase->currentNetwork();
>
> if(net)m_pSrv = net->currentServer();
> QString srvname = m_pSrv->hostname();
> setCaption(srvname);
> connect ( this, SIGNAL( userInput(const QString &) ), this, SLOT ( send(const
> QString &) ) );
> }
>
> beConsole::~beConsole()
> {
> delete m_pSrv;
> }
>
> bool beConsole::connectToServer()
> {
> if(!m_pSrv) { return false; }
> // QString text = "Connect to server";
> // m_pLineView->addLine(text);
> // \n for new liens
> // \t for tabs
> append("<mytag>Connecting to server...</mytag>");
>
> m_pQSocket = new QSocket(this);
> connect( m_pQSocket, SIGNAL( hostFound() ), this, SLOT( hostFound() ) );
> connect( m_pQSocket, SIGNAL( connected() ), this, SLOT( connected() ) );
> connect( m_pQSocket, SIGNAL( readyRead() ), this, SLOT(socketReadyRead()) );
> connect( m_pQSocket, SIGNAL( connectionClosed() ), this,
> SLOT( disconnected() ));
> m_pQSocket->connectToHost( m_pSrv->hostname(), m_pSrv->port() );
> return true;
> }
>
>
> void beConsole::hostFound()
> {
> append("<mytag>Host found ...</mytag>");
> }
>
> void beConsole::connected()
> {
> append("<mytag>Connected to "+m_pSrv->hostname()+"</mytag>");
> QString cmd;
> cmd = "USER alex 0 "+m_pSrv->hostname()+" :Using beIRC 0.0.1\n";
> m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
> cmd = "NICK blackeagle654\n";
> m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
> }
>
> void beConsole::socketReadyRead()
> {
> // append("<mytag>Socket is ready to read</mytag>");
> while ( m_pQSocket->canReadLine() ) {
>
> QString msg = m_pQSocket->readLine();
> QRegExp rxA("(.*)\n$");
> rxA.search( msg );
> append( rxA.cap(1) );
> /* BEGIN ping pong fast reply */
> QRegExp rx("^PING :([0-9]+)");
> int pos;
> if( (pos = rx.search(msg)) != -1)
> {
> QString cmd = "PONG :"+rx.cap(1)+"\n";
> m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
> }
> /* END ping pong fast reply */
> QRegExp rx2("376.*End of /MOTD command");
> if( (pos = rx2.search(msg)) != -1)
> {
> QString cmd = "JOIN #gentoo\n";
> m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
> }
> }
> }
>
> void beConsole::disconnected()
> {
> append("<mytag>Disconnected from server</mytag>");
> }
>
> void beConsole::send(const QString & command)
> {
> append("<command>"+command+"</command>");
> // command.append("\n");
> QString tmp = command+"\n";
> m_pQSocket->writeBlock( tmp.latin1(), tmp.length() );
> }
>
> KviIrcServer* beConsole::server()
> {
> qDebug("returning server");
> return m_pSrv;
> }
>
>
> Thanks for any help !
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Per W. <pw...@ia...> - 2004-12-15 21:55:34
|
Wait a minute.
m_pSrv is a pointer pointing to an object.
KviIrcServer* beConsole::server()
should return a pointer, i.e. the contents of m_pSrv, i.e.
return m_pSrv;
and not a copy of an object as is done by
return *m_pSrv;
When a function returns a pointer, this of course doesn't mean that it
returns the address of the pointer, but the value stored in the pointer,
i.e. the address of an object.
/Per W
On Wed, 15 Dec 2004, Black Eagle wrote:
> It's tricky but I think I got it
>
> In fact I am returning a pointer to m_pSrv which is a pointer itself, rat=
her
> than the adress of the class, right ?
>
> What could have worked is if m_pSrv was the class and that I returned &m_=
pSrv,
> the adress of the class.
>
> But I've done like this :
> KviIrcServer beConsole::server()
> {
> =09qDebug("returning server");
> =09return *m_pSrv;
> }
>
> Thanks for help !
>
> Le mercredi 15 D=E9cembre 2004 22:06, Alfred P. Reaud a =E9crit :
> > Hi Black Eagle,
> >
> > It could be that you are returning the address of m_pSrv rather than it=
's
> > contents. You've declared m_pSrv as a pointer to a KviIrcServer class.
> > However, in server(), you return m_pSrv, rather than it's contents *m_p=
Srv.
> > server() is declared as returning a pointer to the class, which is the
> > value of m_pSrv, not it's address.
> >
> > Hope that makes sense!
> >
> > Black Eagle <bla...@ea...> wrote:
> >
> > Hi guys!
> >
> > I got a problem at run time, when using a pointer in a function.
> >
> > The error is in the function KviIrcServer* server() at line : return
> > m_pSrv;
> >
> > In all other functions I got no problem with this variable. It is anoth=
er
> > class that tries to call this function, it's the friendclass beChannel
> >
> >
> > <snip>
> > class KviIrcServer;
> > <snip>
> > KviIrcServer* server();
> > <snip>
> > private :
> > KviIrcServer * m_pSrv;
> > <snip>
> > KviIrcServer* beConsole::server()
> > {
> > qDebug("returning server");
> > return m_pSrv;
> > }
> > <snip>
> >
> >
> >
> >
> > Alfred P. Reaud
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Per W. <pw...@ia...> - 2004-12-15 21:51:14
|
Are you sure that the beChannel object really have a valid pointer to your
beMDIWindow object.
Also, note that qDebug() which I don't know what it does might be
dangerous in case you have a multi-threaded application. Only the thread
that owns the MDI window should try and used any GDI objects.
/Per W
On Wed, 15 Dec 2004, Black Eagle wrote:
> Hi guys!
>
> I got a problem at run time, when using a pointer in a function.
>
> The error is in the function KviIrcServer* server() at line : return m_pSrv;
>
> In all other functions I got no problem with this variable. It is another
> class that tries to call this function, it's the friendclass beChannel
>
>
> Here is the beConsole.h
>
> #ifndef BE_CONSOLE_H
> #define BE_CONSOLE_H
>
> #include "beMDIWindow.h"
>
> class KviIrcServer;
>
> class beConsole : beMDIWindow
> {
> friend class beIRC;
> friend class beChannel;
> Q_OBJECT
> public :
> beConsole(QWidget * parent = 0, const char * name = 0, WFlags f = 0);
> ~beConsole();
>
> KviIrcServer* server();
> protected :
> bool connectToServer();
> private slots :
>
> virtual void hostFound();
> virtual void connected();
> virtual void socketReadyRead();
> virtual void disconnected();
> void send(const QString & command);
> private :
> KviIrcServer * m_pSrv;
> // KviProxy * prx;
>
> QSocket * m_pQSocket;
> };
>
> #endif
>
> And here is the beConsole.cpp
> // beIRC stuff
> #include "beConsole.h"
> // kvirc stuff
> #define HAVE_CONFIG_H
> #include "config.h"
> #include <kvirc/3.0.1/kvi_app.h>
> #include <kvirc/3.0.1/kvi_ircserverdb.h>
> #include <kvirc/3.0.1/kvi_confignames.h>
> // QT Stuff
> #include <qregexp.h>
> #include <qsocket.h>
>
> extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase;
>
> beConsole::beConsole(QWidget * parent,const char * name, WFlags f) :
> beMDIWindow(parent,name,f)
> {
> m_windowType = beMDIWindow::Console;
>
> KviIrcNetwork * net = g_pIrcServerDataBase->currentNetwork();
>
> if(net)m_pSrv = net->currentServer();
> QString srvname = m_pSrv->hostname();
> setCaption(srvname);
> connect ( this, SIGNAL( userInput(const QString &) ), this, SLOT ( send(const
> QString &) ) );
> }
>
> beConsole::~beConsole()
> {
> delete m_pSrv;
> }
>
> bool beConsole::connectToServer()
> {
> if(!m_pSrv) { return false; }
> // QString text = "Connect to server";
> // m_pLineView->addLine(text);
> // \n for new liens
> // \t for tabs
> append("<mytag>Connecting to server...</mytag>");
>
> m_pQSocket = new QSocket(this);
> connect( m_pQSocket, SIGNAL( hostFound() ), this, SLOT( hostFound() ) );
> connect( m_pQSocket, SIGNAL( connected() ), this, SLOT( connected() ) );
> connect( m_pQSocket, SIGNAL( readyRead() ), this, SLOT(socketReadyRead()) );
> connect( m_pQSocket, SIGNAL( connectionClosed() ), this,
> SLOT( disconnected() ));
> m_pQSocket->connectToHost( m_pSrv->hostname(), m_pSrv->port() );
> return true;
> }
>
>
> void beConsole::hostFound()
> {
> append("<mytag>Host found ...</mytag>");
> }
>
> void beConsole::connected()
> {
> append("<mytag>Connected to "+m_pSrv->hostname()+"</mytag>");
> QString cmd;
> cmd = "USER alex 0 "+m_pSrv->hostname()+" :Using beIRC 0.0.1\n";
> m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
> cmd = "NICK blackeagle654\n";
> m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
> }
>
> void beConsole::socketReadyRead()
> {
> // append("<mytag>Socket is ready to read</mytag>");
> while ( m_pQSocket->canReadLine() ) {
>
> QString msg = m_pQSocket->readLine();
> QRegExp rxA("(.*)\n$");
> rxA.search( msg );
> append( rxA.cap(1) );
> /* BEGIN ping pong fast reply */
> QRegExp rx("^PING :([0-9]+)");
> int pos;
> if( (pos = rx.search(msg)) != -1)
> {
> QString cmd = "PONG :"+rx.cap(1)+"\n";
> m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
> }
> /* END ping pong fast reply */
> QRegExp rx2("376.*End of /MOTD command");
> if( (pos = rx2.search(msg)) != -1)
> {
> QString cmd = "JOIN #gentoo\n";
> m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
> }
> }
> }
>
> void beConsole::disconnected()
> {
> append("<mytag>Disconnected from server</mytag>");
> }
>
> void beConsole::send(const QString & command)
> {
> append("<command>"+command+"</command>");
> // command.append("\n");
> QString tmp = command+"\n";
> m_pQSocket->writeBlock( tmp.latin1(), tmp.length() );
> }
>
> KviIrcServer* beConsole::server()
> {
> qDebug("returning server");
> return m_pSrv;
> }
>
>
> Thanks for any help !
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Black E. <bla...@ea...> - 2004-12-15 21:42:49
|
It's tricky but I think I got it
In fact I am returning a pointer to m_pSrv which is a pointer itself, rathe=
r=20
than the adress of the class, right ?
What could have worked is if m_pSrv was the class and that I returned &m_pS=
rv,=20
the adress of the class.
But I've done like this :
KviIrcServer beConsole::server()
{
qDebug("returning server");
return *m_pSrv;
}
Thanks for help !
Le mercredi 15 D=E9cembre 2004 22:06, Alfred P. Reaud a =E9crit :
> Hi Black Eagle,
>
> It could be that you are returning the address of m_pSrv rather than it's
> contents. You've declared m_pSrv as a pointer to a KviIrcServer class.=20
> However, in server(), you return m_pSrv, rather than it's contents *m_pSr=
v.
> server() is declared as returning a pointer to the class, which is the
> value of m_pSrv, not it's address.
>
> Hope that makes sense!
>
> Black Eagle <bla...@ea...> wrote:
>
> Hi guys!
>
> I got a problem at run time, when using a pointer in a function.
>
> The error is in the function KviIrcServer* server() at line : return
> m_pSrv;
>
> In all other functions I got no problem with this variable. It is another
> class that tries to call this function, it's the friendclass beChannel
>
>
> <snip>
> class KviIrcServer;
> <snip>
> KviIrcServer* server();
> <snip>
> private :
> KviIrcServer * m_pSrv;
> <snip>
> KviIrcServer* beConsole::server()
> {
> qDebug("returning server");
> return m_pSrv;
> }
> <snip>
>
>
>
>
> Alfred P. Reaud
|
|
From: Alfred P. R. <al...@ya...> - 2004-12-15 21:06:28
|
Hi Black Eagle,
It could be that you are returning the address of m_pSrv rather than it's contents. You've declared m_pSrv as a pointer to a KviIrcServer class. However, in server(), you return m_pSrv, rather than it's contents *m_pSrv. server() is declared as returning a pointer to the class, which is the value of m_pSrv, not it's address.
Hope that makes sense!
Black Eagle <bla...@ea...> wrote:
Hi guys!
I got a problem at run time, when using a pointer in a function.
The error is in the function KviIrcServer* server() at line : return m_pSrv;
In all other functions I got no problem with this variable. It is another
class that tries to call this function, it's the friendclass beChannel
<snip>
class KviIrcServer;
<snip>
KviIrcServer* server();
<snip>
private :
KviIrcServer * m_pSrv;
<snip>
KviIrcServer* beConsole::server()
{
qDebug("returning server");
return m_pSrv;
}
<snip>
Alfred P. Reaud
|
|
From: Black E. <bla...@ea...> - 2004-12-15 20:30:05
|
Hi guys!
I got a problem at run time, when using a pointer in a function.
The error is in the function KviIrcServer* server() at line : return m_pSrv;
In all other functions I got no problem with this variable. It is another
class that tries to call this function, it's the friendclass beChannel
Here is the beConsole.h
#ifndef BE_CONSOLE_H
#define BE_CONSOLE_H
#include "beMDIWindow.h"
class KviIrcServer;
class beConsole : beMDIWindow
{
friend class beIRC;
friend class beChannel;
Q_OBJECT
public :
beConsole(QWidget * parent = 0, const char * name = 0, WFlags f = 0);
~beConsole();
KviIrcServer* server();
protected :
bool connectToServer();
private slots :
virtual void hostFound();
virtual void connected();
virtual void socketReadyRead();
virtual void disconnected();
void send(const QString & command);
private :
KviIrcServer * m_pSrv;
// KviProxy * prx;
QSocket * m_pQSocket;
};
#endif
And here is the beConsole.cpp
// beIRC stuff
#include "beConsole.h"
// kvirc stuff
#define HAVE_CONFIG_H
#include "config.h"
#include <kvirc/3.0.1/kvi_app.h>
#include <kvirc/3.0.1/kvi_ircserverdb.h>
#include <kvirc/3.0.1/kvi_confignames.h>
// QT Stuff
#include <qregexp.h>
#include <qsocket.h>
extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase;
beConsole::beConsole(QWidget * parent,const char * name, WFlags f) :
beMDIWindow(parent,name,f)
{
m_windowType = beMDIWindow::Console;
KviIrcNetwork * net = g_pIrcServerDataBase->currentNetwork();
if(net)m_pSrv = net->currentServer();
QString srvname = m_pSrv->hostname();
setCaption(srvname);
connect ( this, SIGNAL( userInput(const QString &) ), this, SLOT ( send(const
QString &) ) );
}
beConsole::~beConsole()
{
delete m_pSrv;
}
bool beConsole::connectToServer()
{
if(!m_pSrv) { return false; }
// QString text = "Connect to server";
// m_pLineView->addLine(text);
// \n for new liens
// \t for tabs
append("<mytag>Connecting to server...</mytag>");
m_pQSocket = new QSocket(this);
connect( m_pQSocket, SIGNAL( hostFound() ), this, SLOT( hostFound() ) );
connect( m_pQSocket, SIGNAL( connected() ), this, SLOT( connected() ) );
connect( m_pQSocket, SIGNAL( readyRead() ), this, SLOT(socketReadyRead()) );
connect( m_pQSocket, SIGNAL( connectionClosed() ), this,
SLOT( disconnected() ));
m_pQSocket->connectToHost( m_pSrv->hostname(), m_pSrv->port() );
return true;
}
void beConsole::hostFound()
{
append("<mytag>Host found ...</mytag>");
}
void beConsole::connected()
{
append("<mytag>Connected to "+m_pSrv->hostname()+"</mytag>");
QString cmd;
cmd = "USER alex 0 "+m_pSrv->hostname()+" :Using beIRC 0.0.1\n";
m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
cmd = "NICK blackeagle654\n";
m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
}
void beConsole::socketReadyRead()
{
// append("<mytag>Socket is ready to read</mytag>");
while ( m_pQSocket->canReadLine() ) {
QString msg = m_pQSocket->readLine();
QRegExp rxA("(.*)\n$");
rxA.search( msg );
append( rxA.cap(1) );
/* BEGIN ping pong fast reply */
QRegExp rx("^PING :([0-9]+)");
int pos;
if( (pos = rx.search(msg)) != -1)
{
QString cmd = "PONG :"+rx.cap(1)+"\n";
m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
}
/* END ping pong fast reply */
QRegExp rx2("376.*End of /MOTD command");
if( (pos = rx2.search(msg)) != -1)
{
QString cmd = "JOIN #gentoo\n";
m_pQSocket->writeBlock( cmd.latin1(), cmd.length() );
}
}
}
void beConsole::disconnected()
{
append("<mytag>Disconnected from server</mytag>");
}
void beConsole::send(const QString & command)
{
append("<command>"+command+"</command>");
// command.append("\n");
QString tmp = command+"\n";
m_pQSocket->writeBlock( tmp.latin1(), tmp.length() );
}
KviIrcServer* beConsole::server()
{
qDebug("returning server");
return m_pSrv;
}
Thanks for any help !
|
|
From: Alfred P. R. <al...@ya...> - 2004-12-15 20:26:37
|
Hi Mohamad, Just use Google for 'tutorial c++ x', where x is autoconf, automake, etc. You should be able to find what you want on-line. mohamad chaitou <moh...@in...> wrote: Hi, I search some tutorials to begin building projects over j++, precisely i need to learn about autoconf, automake and which macro language we use to edit configure.in and Makefile.am. Can anybody guide me to some useful tutorials about these topics? Thanks in adavance <snip> Alfred P. Reaud |
|
From: mohamad c. <moh...@in...> - 2004-12-15 16:58:37
|
excuse me i meant g++ and not j++ Thank you |
|
From: mohamad c. <moh...@in...> - 2004-12-15 16:46:36
|
Hi, I search some tutorials to begin building projects over j++, precisely i need to learn about autoconf, automake and which macro language we use to edit configure.in and Makefile.am. Can anybody guide me to some useful tutorials about these topics? Thanks in adavance |
|
From: Per W. <pw...@ia...> - 2004-12-15 10:37:52
|
The problem is that it isn't enough to add an include file to your source.
You must also add the corresponding library file (libXX.a) to the project.
Specify -libXX in the linker options.
/Per W
On Wed, 15 Dec 2004, mohamad chaitou wrote:
> Hi all,
> I'm new to g++. I'm trying to use a new library for linear algebra
> called Lapack++, the problem is when I include this library into a
> source file I get errors of kinds "undefined refernce". for example this
> little and stupid code:
> #define LA_COMPLEX_SUPPORT
> #include <lapack++.h> // the new library
> #include <iostream>
> int main()
> {
> LaGenMatDouble A ; // this uses the new library
> std::cout<< "This is a test "<< std::endl;
> return 0;
> }
> the erros are like:
> /tmp/cc2YU0wo.o(.text+0x19): In function `main':
> undefined reference to =AB LaGenMatDouble::LaGenMatDouble[in-charge]()=BB
>
> What could be the problem?
> Please give me some feddback.
> thanks in advance
>
>
>
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: mohamad c. <moh...@in...> - 2004-12-15 09:19:15
|
Hi all,
I'm new to g++. I'm trying to use a new library for linear algebra=20
called Lapack++, the problem is when I include this library into a=20
source file I get errors of kinds "undefined refernce". for example this=20
little and stupid code:
#define LA_COMPLEX_SUPPORT
#include <lapack++.h> // the new library
#include <iostream>
int main()
{
LaGenMatDouble A ; // this uses the new library=20
std::cout<< "This is a test "<< std::endl;
return 0;
}
the erros are like:
/tmp/cc2YU0wo.o(.text+0x19): In function `main':
undefined reference to =AB LaGenMatDouble::LaGenMatDouble[in-charge]()=BB
What could be the problem?
Please give me some feddback.
thanks in advance
|
|
From: Andre M. B. <ab...@cp...> - 2004-12-14 23:06:24
|
Dear Users, Does anybody know where can I find a C code that does a .wav to .txt file conversion? I=B4m not talking about speech to text conversion, ok? I am looking for a C code that pick a .wav audio file and makes a "translation" to a time vector (a music(n) vector). This vector, for example, can be loaded in Excel or MathLab to plot a figure, ok? Regards Andre |
|
From: Daniel K. O. <dan...@ya...> - 2004-12-13 21:04:01
|
Farzan Hajian wrote:
> Dear Dec-C++ user,
> I have problem with using "asm" statement.
> Please tell me the correct syntax of this statement.
> For example how can I use the following assembly codes in my C++
> programs?
>
> mov ah,20h
> mov bl,ah
> inc bl
> add ah,bl
You use the way that is defined in the C++ standard:
asm(" ........ ");
So you would do:
---
asm(
"movb $0x20, %ah \n"
"movb %ah, %bl \n"
"incb %bl \n"
"addb %bl, %ah \n"
);
---
Remember, GCC uses AT&T syntax by default. If you want to work with
Intel syntax use the "-masm" option:
|-masm=|dialect||
Output asm instructions using selected dialect. Supported choices
are |intel| or |att| (the default one).
More info at:
http://www.delorie.com/djgpp/doc/brennan/brennan_att_inline_djgpp.html
Daniel K. O.
|
|
From: Isaac E. W. <is...@wa...> - 2004-12-13 20:53:18
|
Thanks! Everything works now and is happy....and so am I. :) -------Original Message------- > From: "Alfred P. Reaud" <al...@ya...> > Subject: Re: [Dev-C++] Mixed C and C++ Compilation? > Sent: Dec 13 2004 14:42:58 > > HI Issac, > > You should add the SQLite files to the project, then go into the Project Options -> Compiler window and select compile as C for the SQLite sources. You have to do that to each file individually. > > _"ISAAC E. WAGNER" _ wrote: > I've got a C++ project that requires a public domain C library (SQLite). I am trying to compile the library directly into the project, instead of linking to the library. I've tried compiling SQLite as a C++ project, but it generates tons of errors, so it really does need to be C compiled. Anyway, is there a way to add those files to my project, but have the C compiler invoked on them, and the C++ compiler invoked on the rest? > > Alfred P. Reaud -------Original Message------- |
|
From: Farzan H. <far...@ho...> - 2004-12-13 20:45:26
|
Dear Dec-C++ user, I have problem with using "asm" statement. Please tell me the correct syntax of this statement. For example how can I use the following assembly codes in my C++ programs= ? mov ah,20h mov bl,ah inc bl add ah,bl Thanks, |
|
From: Alfred P. R. <al...@ya...> - 2004-12-13 20:42:58
|
HI Issac, You should add the SQLite files to the project, then go into the Project Options -> Compiler window and select compile as C for the SQLite sources. You have to do that to each file individually. "Isaac E. Wagner" <is...@wa...> wrote: I've got a C++ project that requires a public domain C library (SQLite). I am trying to compile the library directly into the project, instead of linking to the library. I've tried compiling SQLite as a C++ project, but it generates tons of errors, so it really does need to be C compiled. Anyway, is there a way to add those files to my project, but have the C compiler invoked on them, and the C++ compiler invoked on the rest? <snip> Alfred P. Reaud |
|
From: Isaac E. W. <is...@wa...> - 2004-12-13 17:49:24
|
I've got a C++ project that requires a public domain C library (SQLite). I am trying to compile the library directly into the project, instead of linking to the library. I've tried compiling SQLite as a C++ project, but it generates tons of errors, so it really does need to be C compiled. Anyway, is there a way to add those files to my project, but have the C compiler invoked on them, and the C++ compiler invoked on the rest? Does that make sense? Thanks! |
|
From: Jonathan D.T. <tur...@ka...> - 2004-12-13 07:39:00
|
Hi, I'm trying to debug a program which I know produces a segfault at a certain point. I've set a number of breakpoints by clicking on the black band at the left of the editor window. When I click the purple checkmark icon to initiate debugging, there seems to be no visual clue as to current location in the program. If I click "run to cursor" several times, I get the expected segfault, but I never know where I am in the program, and clicking "Step Into" or "Next Step" seems to have no effect. I've compiled the program with all optimizations disabled and with the -g option. Any help would be greatly appreciated. Best Regards, Jonathan Turkanis |