dev-cpp-users Mailing List for Dev-C++ (Page 253)
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
|
|
From: Obi <ob...@ch...> - 2004-02-10 22:31:22
|
At 11:32 10/02/2004 -0800, David McKen wrote: >I am doing some developement for some *NIX based systems and I would >like to know if anyone knows a good refrence for the standard POSIX >C/C++ library. Not sure if I would say it was a reference as such, but for all my *nix/posix work my copy of "Advanced programming in the Unix environment" by Stevens, was never far from hand. >Also if someone knows a good refrence for the ANSI standard C/C++ >libraries I would be much abliged. The favoured book here, with good reason. is "The C++ Standard Library: A Tutorial & reference" by Josuttis. This is never far from hand, in fact I can see it from right here :-) |
|
From: <F14...@ao...> - 2004-02-10 21:21:29
|
Dudes and Dudettes
I downloaded Devc++ 4980, went to vUpdate and got the critical update,
but the Crash Detection download wouldnt work. So I ignored it. Next, I used
the new web updater to download the updates there, and sure enough it
downloads. Right after it says "Now they will be installed", I get the Blue Screen of
Death (the "Press any button to continue, or Ctrl+Alt+Del to restart". I cant
get them to install! Please help, a great reward will be given to whoever
fixes this (not really).
|
|
From: David M. <ci...@ya...> - 2004-02-10 19:32:47
|
I am doing some developement for some *NIX based systems and I would like to know if anyone knows a good refrence for the standard POSIX C/C++ library. Also if someone knows a good refrence for the ANSI standard C/C++ libraries I would be much abliged. Signed David McKen __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html |
|
From: <an...@al...> - 2004-02-10 16:24:40
|
Hi, I am trying to intergrate Qt and Dev Cpp at the moment and am having a little bit of trouble. Basically all I want to do is run qmake on project file I create and then make. I don't want Dev Cpp to do any compiling but let qmake build the makefile and make build from this. How can I get about doing this ? Has anyone else tried doing this ? Also I have added some Tools within the Tools menu, but it seems that you can only run one of the configured tools at any one time... Is this right ? TIA Andy |
|
From: joon w. <tw...@ho...> - 2004-02-10 15:07:34
|
hi, i know tis is a stupid question, but how do i make e code completion work? or mayb i shld ask how it works? once or twice i manage 2 get e code completion window pops up... but i din know how i did dat...n cant replicate.... sorry for e stupidity of tis question. regards, joon _________________________________________________________________ Download the latest MSN Messenger http://messenger.msn.com.my |
|
From: Mats L. <mat...@to...> - 2004-02-10 13:25:46
|
From: "Jon Ingason" <Jon...@te...> > I have just downloaded Dev-C++ and MinGW and are trying > to configure Dev-C++ to use MinGW g++ to compile hello.cpp > which you find under directory Examples\Hello in the > Dev-C++ distribution. I configure where the compiler, > include files and library are located under > Tools->Compiler Options->Directories. > > What I do is that I open the project "Hello Sample" and > just compile it. Then I get following in the Compile Log: > > Compiler: Default compiler > Building Makefile: "C:\Mina okument\Programming\DevC\Hello\Makefile.win" You're missing a "d" in "dokument". > Executing make... > make.exe -f "C:\Mina dokument\Programming\DevC\Hello\Makefile.win" all > Execution terminated > > What is the problem? I think it's recommended to install DevCpp in a folder without spaces so "Mina dokument" would be a bad spot. Why not stick with the default "C:\DevCpp"? /M |
|
From: Jon I. <Jon...@te...> - 2004-02-10 11:45:26
|
I have just downloaded Dev-C++ and MinGW and are trying to configure Dev-C++ to use MinGW g++ to compile hello.cpp which you find under directory Examples\Hello in the Dev-C++ distribution. I configure where the compiler, include files and library are located under Tools->Compiler Options->Directories. What I do is that I open the project "Hello Sample" and just compile it. Then I get following in the Compile Log: Compiler: Default compiler Building Makefile: "C:\Mina okument\Programming\DevC\Hello\Makefile.win" Executing make... make.exe -f "C:\Mina dokument\Programming\DevC\Hello\Makefile.win" all Execution terminated What is the problem? --jonsi |
|
From: <kl...@po...> - 2004-02-10 11:21:26
|
Hello all!
I have encountered a serious problem:
I try to compile the following:
#include <iostream>
#include <stdlib.h>
#include <ddk/ntddk.h>
using namespace std;
int main(int argc, char *argv[])
{
unsigned char address[3]={0x78,0x03,0};
unsigned char test=READ_PORT_UCHAR(address);
return 0;
}
And get a linker error:
[Linker error] undefined reference to `_imp__READ_PORT_UCHAR@4'
OK, I guess I need to add a library, but which one and where is it? I
think I need to add "-lNAME" to additional linker options in project
options, right?
Is there any document that would explain this to me?
Best regards, Klima
|
|
From: Zonnet <gko...@zo...> - 2004-02-10 10:46:35
|
This is just why people use a project file in DevCpp. This file contains the settings of DevCpp. If you need cross-platform stuff, then DevCpp is not for you... Otherwise: learn to use Makefiles. And have a look into automake/autoconf= =2E.. wrk, Gerke Andr=E9 Mac=E1rio Barros wrote: >Dear Users, > > When I bring my C code from one computer >to another sometimes it doesn=B4t run. > This happens allways because some "tick" >configuration option enabled in one computer >that it isn=B4t enabled on the other computer. > I am not working with project files. I >work directly with the C codes. > *** Is there any way to save all the >Dev-C++ configuration in one file from one >computer, to load it after in another >computer? > *** If there is a solution, and this >solution requires to work with project files, >ok, no problem... > > Regards > >Andre Barros > > > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >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 > =20 > |
|
From: Per W. <pw...@ia...> - 2004-02-10 10:37:22
|
Check out the Graphics Gems series of books. The sources from them are available for download from a number of places. Yes, it is possible to draw a circle using the cos and sin functions. However, this is not a recommended method since they are expensive functions. There are a number of methods where the algorithm only process 90 or 45 degrees - depending on support for elipses or non-unity aspect ratio - and where next pixel is found in an iterative loop through a DDA - digital differential analysis - evaluation, i.e. given a specific pixel, the algorithm just evaluates if next pixel should be one step right or one step up. /Per W On Mon, 9 Feb 2004, Brian Wallace wrote: > If anyone is wondering how to draw a circle pixel by pixel, use x=(Radius)*cos(Number increasing from 0-6.26 by small incraments) + xpos of center of circle, > y=(radius)*sin(Number increasing from 0-6.26 by small incraments) + ypos > Put that inside a loop where t increases by something like .01 and draw the point inside the loop also. > > _______________________________________________________________________________________________________________________________________________________________________ > Click here for a FREE online computer virus scan from McAfee. ------------------------------------------------------- The SF.Net email is sponsored by > EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn _______________________________________________ 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: <and...@su...> - 2004-02-10 10:16:37
|
Dear Users, When I bring my C code from one computer to another sometimes it doesn´t run. This happens allways because some "tick" configuration option enabled in one computer that it isn´t enabled on the other computer. I am not working with project files. I work directly with the C codes. *** Is there any way to save all the Dev-C++ configuration in one file from one computer, to load it after in another computer? *** If there is a solution, and this solution requires to work with project files, ok, no problem... Regards Andre Barros |
|
From: w. y. <yok...@ve...> - 2004-02-10 09:59:31
|
Brian Wallace wrote: > > If anyone is wondering how to draw a circle pixel by pixel, use x=(Radius)*cos(Number increasing from 0-6.26 by small incraments) + xpos of center of circle, y=(radius)*sin(Number increasing from 0-6.26 by small incraments) + ypos > Put that inside a loop where t increases by something like .01 and draw the point inside the loop also. You can use larger increments and just connect the points by lines. Bigger circles need smaller increments to look round though. However, sin and cos are time consuming functions. Try searching for "circle algorithm" in google. |
|
From: Brian W. <nig...@ho...> - 2004-02-10 01:39:29
|
<html><div style='background-color:'><DIV class=RTE>If anyone is wondering how to draw a circle pixel by pixel, use x=(Radius)*cos(Number increasing from 0-6.26 by small incraments) + xpos of center of circle, y=(radius)*sin(Number increasing from 0-6.26 by small incraments) + ypos</DIV> <DIV class=RTE>Put that inside a loop where t increases by something like .01 and draw the point inside the loop also.</DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMAENUS/2755??PS=">Click here for a FREE online computer virus scan from McAfee.</a> </html> |
|
From: Scott S. <age...@co...> - 2004-02-10 01:30:06
|
Sometimes you have to make sure that in autoexec.bat there is a SET PATH to the compiler. I am not sure about the config files though, as I myself wonder this sometimes. If you want a good command line compiler, try checking out DJGPP. Juan Antonio Navarro Perez wrote: > > Hello, > > I know this question is not really about dev-cpp but the compiler.. I > remember that on previous versions of dev-cpp the Mingw/GCC installed > with it allowed me to compile from a command line (dos window). > > However, last version of dev-cpp (including the updated compiler) > does not seem to allow this as transparent as it was in previous > versions.. when I try to compile from command line I get an error > complaining about libraries not found.. I guess I have to write some > config file and place it somewhere so that gcc can find the paths for > the libraries.. but don't know how to write this config file or where to > place it.. > > does anyone has an idea?? > > regards, > > juan antonio > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > 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: Juan A. N. P. <ma1...@ma...> - 2004-02-09 22:50:15
|
Hello,
I know this question is not really about dev-cpp but the compiler.. I
remember that on previous versions of dev-cpp the Mingw/GCC installed
with it allowed me to compile from a command line (dos window).
However, last version of dev-cpp (including the updated compiler)
does not seem to allow this as transparent as it was in previous
versions.. when I try to compile from command line I get an error
complaining about libraries not found.. I guess I have to write some
config file and place it somewhere so that gcc can find the paths for
the libraries.. but don't know how to write this config file or where to
place it..
does anyone has an idea??
regards,
juan antonio
|
|
From: Juan A. N. P. <ma1...@ma...> - 2004-02-09 22:49:11
|
Hello,
sorry if this has previously asked or reported (i guess so, but i
just don't know) but it seems that in last version of dev-cpp the ide
has troubles parsing the compiler output when showing errors.. an
unreadable set of lines "apparently cut at random" show pieces of the
errors, but it is really hard to follow them..
my current work arround is to view the "Compile Log" window where
the full compiler output is shown to find out which errors i have got
from the compiler..
but I would like, of course to see the correct output in the
compiler tab of the dev-cpp IDE..
regards,
juan antonio
|
|
From: P.D. v. Z. <pd...@xs...> - 2004-02-09 12:55:06
|
#include <iostream>
#include <fstream>
#define DEBUG 1
using namespace std;
enum { SUCCESS, FAILURE };
void printDebugMsg(char * msg);
void printDebugMsg(char * msg)
{
// Should we be printing a msg? (is DEBUG on?)
// No? return.
#ifdef DEBUG
cout << "DEBUG MSG: " << msg << endl;
#endif
}
int main(int argc, char **argv)
{
char dbdump_filename[1024];
if (argc > 1)
{
if (argc >= 2)
{
strcpy(dbdump_filename, argv[1]);
}
} else {
/*
Passing in the dbdump_filename in as an argument works.
But, this isn't working. Although '*dbdump_filename' seems
to hold the
right value,
it actually looks like a pointer (not an memory address
though!)
when you try to open the file.
:/
*/
cout << "Enter db dump filename: ";
cin.getline(dbdump_filename, 1024);
}
char debugMsg[1024];
cout << "Db filename: " << dbdump_filename << endl;
ifstream fp;
fp.open(dbdump_filename);
if (!fp.is_open())
{
cout << "Unable to open file " << dbdump_filename << endl;
return FAILURE;
}
cout << "Opening file " << dbdump_filename << ".." << endl;
int bufferSize = 10240;
char line[bufferSize];
char *tablename;
char find_string[] = "CREATE TABLE";
while (!fp.eof()) {
fp.getline(line, bufferSize);
// printDebugMsg(line);
tablename = strstr(line, find_string);
cout << "Table Name: " << tablename;
cout << endl;
}
fp.close();
cout << endl;
return SUCCESS;
}
P.S.: Didn't check the strstr() logic, never used it, and can't be bothered
to look up its signature at the moment :)
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...] On Behalf Of Chris
Sent: Monday, February 09, 2004 12:53 PM
To: dev...@li...
Subject: [Dev-C++] strstr question
Hi all,
I'm a newbie at C++ so these are probably simple answers, but I can't
work them out.
My first problem is if I don't pass an argument to the script (and
instead prompt for it), when I print it out I get weird results - which
means I can't access the filename that I type in.
My second problem is I can't work out why
tablename = strstr(line, find_string);
doesn't actually get the tablename.
Everything compiles ok, compiler is
g++ (GCC) 3.3.3 20031229 (prerelease) (Debian)
Thanks for any help offered.
The file I'm trying to parse is a simple mysql dump:
=========
DROP TABLE IF EXISTS table_a;
CREATE TABLE table_a (
a int
);
=========
My code looks like this:
==============================
#include "iostream"
#include "fstream"
#define DEBUG 1
using namespace std;
enum { SUCCESS, FAILURE };
void printDebugMsg(char * msg);
void printDebugMsg(char * msg)
{
// Should we be printing a msg? (is DEBUG on?)
// No? return.
#ifdef DEBUG
cout << "DEBUG MSG: " << msg << endl;
#endif
}
int main(int argc, char **argv)
{
char * dbdump_filename[1024];
if (argc > 1)
{
if (argc >= 2)
{
*dbdump_filename = argv[1];
}
} else {
/*
Passing in the dbdump_filename in as an argument works.
But, this isn't working. Although '*dbdump_filename' seems
to hold the
right value,
it actually looks like a pointer (not an memory address
though!)
when you try to open the file.
:/
*/
cout << "Enter db dump filename: ";
char db_filename[1024];
cin.getline(db_filename, 1024);
*dbdump_filename = db_filename;
}
char debugMsg[1024];
cout << "Db filename: " << *dbdump_filename << endl;
ifstream fp;
fp.open(*dbdump_filename);
if (!fp.is_open())
{
cout << "Unable to open file " << *dbdump_filename << endl;
return FAILURE;
}
cout << "Opening file " << *dbdump_filename << ".." << endl;
int bufferSize = 10240;
char line[bufferSize];
char * tablename;
char find_string[] = "CREATE TABLE";
while (!fp.eof()) {
fp.getline(line, bufferSize);
// printDebugMsg(line);
tablename = strstr(line, find_string);
cout << "Table Name: " << tablename;
cout << endl;
}
fp.close();
cout << endl;
return SUCCESS;
}
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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: Scott S. <age...@co...> - 2004-02-09 12:54:10
|
Using the .h with C++ headers is wrong. You drop off the .h and put "using namespace std" without the quotes in your code. For C headers, you put a c in the front, like cstdio and drop the .h. vasanthsena x wrote: >Hi, > >I am new to c++.On many tutorials and books I have >seen the following > >#include <iostream> > >however this results in an error. >I did the following #include <iostream.h>.this works. > >My question is does it matter if we include ".h" >extension.and what is the right way. > >Thanks, >S. > >__________________________________ >Do you Yahoo!? >Yahoo! Finance: Get your refund fast by filing online. >http://taxes.yahoo.com/filing.html > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >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: Chris <to...@de...> - 2004-02-09 11:59:06
|
Hi all,
I'm a newbie at C++ so these are probably simple answers, but I can't
work them out.
My first problem is if I don't pass an argument to the script (and
instead prompt for it), when I print it out I get weird results - which
means I can't access the filename that I type in.
My second problem is I can't work out why
tablename = strstr(line, find_string);
doesn't actually get the tablename.
Everything compiles ok, compiler is
g++ (GCC) 3.3.3 20031229 (prerelease) (Debian)
Thanks for any help offered.
The file I'm trying to parse is a simple mysql dump:
=========
DROP TABLE IF EXISTS table_a;
CREATE TABLE table_a (
a int
);
=========
My code looks like this:
==============================
#include "iostream"
#include "fstream"
#define DEBUG 1
using namespace std;
enum { SUCCESS, FAILURE };
void printDebugMsg(char * msg);
void printDebugMsg(char * msg)
{
// Should we be printing a msg? (is DEBUG on?)
// No? return.
#ifdef DEBUG
cout << "DEBUG MSG: " << msg << endl;
#endif
}
int main(int argc, char **argv)
{
char * dbdump_filename[1024];
if (argc > 1)
{
if (argc >= 2)
{
*dbdump_filename = argv[1];
}
} else {
/*
Passing in the dbdump_filename in as an argument works.
But, this isn't working. Although '*dbdump_filename' seems to hold the
right value,
it actually looks like a pointer (not an memory address though!)
when you try to open the file.
:/
*/
cout << "Enter db dump filename: ";
char db_filename[1024];
cin.getline(db_filename, 1024);
*dbdump_filename = db_filename;
}
char debugMsg[1024];
cout << "Db filename: " << *dbdump_filename << endl;
ifstream fp;
fp.open(*dbdump_filename);
if (!fp.is_open())
{
cout << "Unable to open file " << *dbdump_filename << endl;
return FAILURE;
}
cout << "Opening file " << *dbdump_filename << ".." << endl;
int bufferSize = 10240;
char line[bufferSize];
char * tablename;
char find_string[] = "CREATE TABLE";
while (!fp.eof()) {
fp.getline(line, bufferSize);
// printDebugMsg(line);
tablename = strstr(line, find_string);
cout << "Table Name: " << tablename;
cout << endl;
}
fp.close();
cout << endl;
return SUCCESS;
}
|
|
From: Daniel G. <sp...@ho...> - 2004-02-09 10:37:25
|
So if you use a pointer you do not need to make the other class a friend...?
yes I see I was wrong. A class just defines a type, and since you are not
needing your class (A) to use the methods and members of B you don't need to
use friend.
ah.
Daniel
>From: Per Westermark <pw...@ia...>
>To: FABIAN HUENUMAN <fhu...@ho...>
>CC: dev...@li...,
><dev...@li...>
>Subject: Re: [Dev-C++] CROSS REFERENCE WITH OBJECTS
>Date: Mon, 9 Feb 2004 10:13:49 +0100 (CET)
>
>class A;
>class B;
>
>class A {
> protected:
> B *ptr_to_B;
>};
>
>class B {
> protected:
> A &ref_to_A;
>};
>
>/Per W
>
>On Sun, 8 Feb 2004, FABIAN HUENUMAN wrote:
>
> > Hello!
> >
> > i have a question about c++, how can I declare that an object A has a
> > reference to an object B, and this object B has a reference to A? it
>this
> > posible.
> > Thanks for the attention.
> >
> > _________________________________________________________________
> > MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/
> >
> >
> >
> > -------------------------------------------------------
> > The SF.Net email is sponsored by EclipseCon 2004
> > Premiere Conference on Open Tools Development and Integration
> > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> > http://www.eclipsecon.org/osdn
> > _______________________________________________
> > 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
> >
>
>
>
>-------------------------------------------------------
>The SF.Net email is sponsored by EclipseCon 2004
>Premiere Conference on Open Tools Development and Integration
>See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
>http://www.eclipsecon.org/osdn
>_______________________________________________
>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
_________________________________________________________________
Tired of 56k? Get a FREE BT Broadband connection
http://www.msn.co.uk/specials/btbroadband
|
|
From: Per W. <pw...@ia...> - 2004-02-09 09:14:04
|
class A;
class B;
class A {
protected:
B *ptr_to_B;
};
class B {
protected:
A &ref_to_A;
};
/Per W
On Sun, 8 Feb 2004, FABIAN HUENUMAN wrote:
> Hello!
>
> i have a question about c++, how can I declare that an object A has a
> reference to an object B, and this object B has a reference to A? it this
> posible.
> Thanks for the attention.
>
> _________________________________________________________________
> MSN Amor: busca tu =BD naranja http://latam.msn.com/amor/
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> 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: Daniel G. <sp...@ho...> - 2004-02-09 07:39:41
|
Perhaps you can declare both classes as firends of each other (use the friend keyword). You can then declare object A in class B and vice-versa (I think). >From: "FABIAN HUENUMAN" <fhu...@ho...> >To: dev...@li..., >dev...@li... >Subject: [Dev-C++] CROSS REFERENCE WITH OBJECTS >Date: Sun, 08 Feb 2004 22:32:04 +0000 > >Hello! > >i have a question about c++, how can I declare that an object A has a >reference to an object B, and this object B has a reference to A? it this >posible. >Thanks for the attention. > >_________________________________________________________________ >MSN Amor: busca tu ½ naranja http://latam.msn.com/amor/ > > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >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 _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger |
|
From: <wa...@wa...> - 2004-02-09 07:19:48
|
On 8 Feb 2004 at 19:10, vasanthsena x wrote: > Hi, > > I am new to c++.On many tutorials and books I have > seen the following > > #include <iostream> > > however this results in an error. > I did the following #include <iostream.h>.this works. > > My question is does it matter if we include ".h" > extension.and what is the right way. The ".h" is the "old" way and shouldn't really be supported anymore. If you use ".h", the compiler makes the assumption that you're following more of a C coding style than a C++ coding style. Mixing C and C++ like that is generally not a good thing. In C++, the common C header files can be included by dropping the .h and adding a c at the beginning like: #include <cstdlib> #include <cstdio> etc. BUT. What error are you getting? If you use #include <iostream> and then use a function from iostream, you have to either precede the function you're using with std:: or add the line "using namespace std;". Take a long hard look at namespaces. :) HTH. Watson (the pencil neck) Davis |
|
From: Stanley <sms...@iw...> - 2004-02-09 05:35:46
|
I just downloaded the new release, and the Help directory, and devcpp.hlp both seem to be missing. The installation menu has them present, but the log does not show the directory being created or the file being unpacked. Is there someplace I can download this file to finish up the installation? TIA _______________________________________________ |
|
From: vasanthsena x <vas...@ya...> - 2004-02-09 03:10:41
|
Hi, I am new to c++.On many tutorials and books I have seen the following #include <iostream> however this results in an error. I did the following #include <iostream.h>.this works. My question is does it matter if we include ".h" extension.and what is the right way. Thanks, S. __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html |