dev-cpp-users Mailing List for Dev-C++ (Page 2)
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
(2) |
2
(2) |
3
|
4
|
5
(2) |
6
(4) |
7
(4) |
8
(3) |
9
(5) |
10
(2) |
11
(6) |
12
(5) |
13
|
14
(3) |
15
(1) |
16
(5) |
17
(4) |
18
(11) |
19
(15) |
20
(1) |
21
(3) |
22
(1) |
23
(8) |
24
(3) |
25
|
26
|
27
(1) |
28
(2) |
29
(2) |
30
(5) |
31
|
From: Ales P. <Al...@qu...> - 2005-12-19 20:55:35
|
have you please some example? I am beginner and dont know how include and used to ibpp, thanks you very much. Ales |
From: Reid T. <rei...@at...> - 2005-12-19 19:17:04
|
Ales Pavel wrote: > Hi I am c++ begginer have you please some example for c++ and firebird? > Thanks > > Ales see http://www.firebirdsql.org/ |
From: Ales P. <Al...@qu...> - 2005-12-19 19:13:56
|
Hi I am c++ begginer have you please some example for c++ and firebird? Thanks Ales |
From: Per W. <pw...@ia...> - 2005-12-19 18:41:09
|
You really shouldn't prioritize your coding (typing) quantity in such ways that you violate the integrity of the source code. There is no way you can maintain such code in the long run. Most companies with software development knowledge would give you a warning: if you want to keep your job, code properly! By the way, never think that the world allows just a single solution to a problem. Here is a quick - but ugly - solution that makes sure that the "call" still looks reasonable. #include <cstdarg> #include <cstdio> struct Log { const char* m_fname; int m_line; bool m_logging; Log() { m_logging =3D true; m_fname =3D NULL; m_line =3D 0; } Log& init(const char* fname,int line) { m_fname =3D fname; m_line =3D line; return *this; } void log(const char* msg,...) { if (m_logging) { char buf[1000]; va_list ap; va_start(ap,msg); vsnprintf(buf,sizeof(buf),msg,ap); va_end(ap); printf("My message: %s:%d: %s\n",m_fname,m_line,buf); } } }; #define LOG log.init(__FILE__,__LINE__).log Log log; int main() { LOG("hello %d %d",1,2); return 0; } It is possible to extend the solution to make it thread-safe too, i.e. make sure that multiple threads will play with individual instances of the m_fname and m_line members. /Per W On Mon, 19 Dec 2005, Minds Work wrote: > I know it is not a beatiful solution... > (but its the one tha will works as we want....) > > > On 12/19/05, Per Westermark <pw...@ia...> wrote: > > > > You do not want to use a solution where your source code contains > > mismatched parentheses. Syntax highlighting, and in some cases > > auto-indent, not to mention lint etc will dislike such code something > > grievously... > > > > /Per W > > > > On Mon, 19 Dec 2005, Minds Work wrote: > > > > > Hi Daneil, > > > > > > My goal is only to write less code, but i like your ideia, so I will = use > > > something like this: > > > #define LOG_INFO_(log) if(log->isInfoEnabled()) log->(__FILE__, > > __LINE__, > > > #define LOG_INFO LOG_INFO_(LOG) > > > > > > #define LOG_DEBUG_(log) if(log->isDebugEnabled()) log->debug(__FILE__= , > > > __LINE__, > > > #define LOG_DEBUG LOG_DEBUG_(LOG) > > > > > > And use as: > > > > > > LOG_DEBUG "x =3D %d", 2); > > > > > > LOG_INFO "%s", "this is a log message"); > > > > > > PS: I already use a log library :) > > > > > > > > > On 12/18/05, Daniel K. O. <dan...@ya...> wrote: > > > > > > > > Per Westermark wrote: > > > > > > > > >Given the billions of lines of existing code without use of > > __VA_ARGS__, > > > > >it really isn't such an important function that it is worth it to > > ignore > > > > >the current language standard. > > > > > > > > > > > > > > Agreed. I was just trying to answer the original question, but I al= so > > > > doubt that it's really needed. > > > > As Minds Work didn't specify what problem he's trying to solve, I > > assume > > > > that the example posted could be easily solved with Per's first > > sugestion. > > > > > > > > Something like this: > > > > > > > > > > > > ----- > > > > > > > > #include <cstdarg> > > > > #include <cstdio> > > > > > > > > #define LOG log_prefix(__FILE__, __LINE__); log > > > > > > > > void log_prefix(const char *file, int line) > > > > { > > > > printf("%s:%d:\t", file, line); > > > > } > > > > > > > > > > > > // here is Per's code > > > > void log(const char *msg,...) { > > > > va_list ap; > > > > > > > > va_start(ap,msg); > > > > vprintf(msg,ap); > > > > va_end(ap); > > > > } > > > > > > > > int main() { > > > > LOG("test %u %u\n",1,2); > > > > return 0; > > > > } > > > > > > > > ----- > > > > > > > > > > > > PS: There's also the C++ way to solve it, using ostreams and > > operator<<, > > > > that obviously won't need a variable number of parameters. > > > > PS2: if the problem is really just logging, there are tons of C++ > > > > libraries that do just this - conveniently. Google a bit, maybe you > > can > > > > use one of them for your needs. > > > > > > > > > > > > --- > > > > Daniel K. O. > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________________ > > > > Yahoo! doce lar. Fa=E7a do Yahoo! sua homepage. > > > > http://br.yahoo.com/homepageset.html > > > > > > > > > > > > > > > > > > > > |
From: <sw...@ma...> - 2005-12-19 15:57:27
|
Who knows how i can connect to MS SQL Server? |
From: Minds W. <min...@gm...> - 2005-12-19 13:45:45
|
I know it is not a beatiful solution... (but its the one tha will works as we want....) On 12/19/05, Per Westermark <pw...@ia...> wrote: > > You do not want to use a solution where your source code contains > mismatched parentheses. Syntax highlighting, and in some cases > auto-indent, not to mention lint etc will dislike such code something > grievously... > > /Per W > > On Mon, 19 Dec 2005, Minds Work wrote: > > > Hi Daneil, > > > > My goal is only to write less code, but i like your ideia, so I will us= e > > something like this: > > #define LOG_INFO_(log) if(log->isInfoEnabled()) log->(__FILE__, > __LINE__, > > #define LOG_INFO LOG_INFO_(LOG) > > > > #define LOG_DEBUG_(log) if(log->isDebugEnabled()) log->debug(__FILE__, > > __LINE__, > > #define LOG_DEBUG LOG_DEBUG_(LOG) > > > > And use as: > > > > LOG_DEBUG "x =3D %d", 2); > > > > LOG_INFO "%s", "this is a log message"); > > > > PS: I already use a log library :) > > > > > > On 12/18/05, Daniel K. O. <dan...@ya...> wrote: > > > > > > Per Westermark wrote: > > > > > > >Given the billions of lines of existing code without use of > __VA_ARGS__, > > > >it really isn't such an important function that it is worth it to > ignore > > > >the current language standard. > > > > > > > > > > > Agreed. I was just trying to answer the original question, but I also > > > doubt that it's really needed. > > > As Minds Work didn't specify what problem he's trying to solve, I > assume > > > that the example posted could be easily solved with Per's first > sugestion. > > > > > > Something like this: > > > > > > > > > ----- > > > > > > #include <cstdarg> > > > #include <cstdio> > > > > > > #define LOG log_prefix(__FILE__, __LINE__); log > > > > > > void log_prefix(const char *file, int line) > > > { > > > printf("%s:%d:\t", file, line); > > > } > > > > > > > > > // here is Per's code > > > void log(const char *msg,...) { > > > va_list ap; > > > > > > va_start(ap,msg); > > > vprintf(msg,ap); > > > va_end(ap); > > > } > > > > > > int main() { > > > LOG("test %u %u\n",1,2); > > > return 0; > > > } > > > > > > ----- > > > > > > > > > PS: There's also the C++ way to solve it, using ostreams and > operator<<, > > > that obviously won't need a variable number of parameters. > > > PS2: if the problem is really just logging, there are tons of C++ > > > libraries that do just this - conveniently. Google a bit, maybe you > can > > > use one of them for your needs. > > > > > > > > > --- > > > Daniel K. O. > > > > > > > > > > > > > > > > > > > > > _______________________________________________________ > > > Yahoo! doce lar. Fa=E7a do Yahoo! sua homepage. > > > http://br.yahoo.com/homepageset.html > > > > > > > > > > > > > |
From: Per W. <pw...@ia...> - 2005-12-19 13:39:10
|
You do not want to use a solution where your source code contains mismatched parentheses. Syntax highlighting, and in some cases auto-indent, not to mention lint etc will dislike such code something grievously... /Per W On Mon, 19 Dec 2005, Minds Work wrote: > Hi Daneil, > > My goal is only to write less code, but i like your ideia, so I will use > something like this: > #define LOG_INFO_(log) if(log->isInfoEnabled()) log->(__FILE__, __LINE__, > #define LOG_INFO LOG_INFO_(LOG) > > #define LOG_DEBUG_(log) if(log->isDebugEnabled()) log->debug(__FILE__, > __LINE__, > #define LOG_DEBUG LOG_DEBUG_(LOG) > > And use as: > > LOG_DEBUG "x =3D %d", 2); > > LOG_INFO "%s", "this is a log message"); > > PS: I already use a log library :) > > > On 12/18/05, Daniel K. O. <dan...@ya...> wrote: > > > > Per Westermark wrote: > > > > >Given the billions of lines of existing code without use of __VA_ARGS_= _, > > >it really isn't such an important function that it is worth it to igno= re > > >the current language standard. > > > > > > > > Agreed. I was just trying to answer the original question, but I also > > doubt that it's really needed. > > As Minds Work didn't specify what problem he's trying to solve, I assum= e > > that the example posted could be easily solved with Per's first sugesti= on. > > > > Something like this: > > > > > > ----- > > > > #include <cstdarg> > > #include <cstdio> > > > > #define LOG log_prefix(__FILE__, __LINE__); log > > > > void log_prefix(const char *file, int line) > > { > > printf("%s:%d:\t", file, line); > > } > > > > > > // here is Per's code > > void log(const char *msg,...) { > > va_list ap; > > > > va_start(ap,msg); > > vprintf(msg,ap); > > va_end(ap); > > } > > > > int main() { > > LOG("test %u %u\n",1,2); > > return 0; > > } > > > > ----- > > > > > > PS: There's also the C++ way to solve it, using ostreams and operator<<= , > > that obviously won't need a variable number of parameters. > > PS2: if the problem is really just logging, there are tons of C++ > > libraries that do just this - conveniently. Google a bit, maybe you can > > use one of them for your needs. > > > > > > --- > > Daniel K. O. > > > > > > > > > > > > > > _______________________________________________________ > > Yahoo! doce lar. Fa=E7a do Yahoo! sua homepage. > > http://br.yahoo.com/homepageset.html > > > > > > > |
From: Minds W. <min...@gm...> - 2005-12-19 12:21:13
|
Hi Daneil, My goal is only to write less code, but i like your ideia, so I will use something like this: #define LOG_INFO_(log) if(log->isInfoEnabled()) log->(__FILE__, __LINE__, #define LOG_INFO LOG_INFO_(LOG) #define LOG_DEBUG_(log) if(log->isDebugEnabled()) log->debug(__FILE__, __LINE__, #define LOG_DEBUG LOG_DEBUG_(LOG) And use as: LOG_DEBUG "x =3D %d", 2); LOG_INFO "%s", "this is a log message"); PS: I already use a log library :) On 12/18/05, Daniel K. O. <dan...@ya...> wrote: > > Per Westermark wrote: > > >Given the billions of lines of existing code without use of __VA_ARGS__, > >it really isn't such an important function that it is worth it to ignore > >the current language standard. > > > > > Agreed. I was just trying to answer the original question, but I also > doubt that it's really needed. > As Minds Work didn't specify what problem he's trying to solve, I assume > that the example posted could be easily solved with Per's first sugestion= . > > Something like this: > > > ----- > > #include <cstdarg> > #include <cstdio> > > #define LOG log_prefix(__FILE__, __LINE__); log > > void log_prefix(const char *file, int line) > { > printf("%s:%d:\t", file, line); > } > > > // here is Per's code > void log(const char *msg,...) { > va_list ap; > > va_start(ap,msg); > vprintf(msg,ap); > va_end(ap); > } > > int main() { > LOG("test %u %u\n",1,2); > return 0; > } > > ----- > > > PS: There's also the C++ way to solve it, using ostreams and operator<<, > that obviously won't need a variable number of parameters. > PS2: if the problem is really just logging, there are tons of C++ > libraries that do just this - conveniently. Google a bit, maybe you can > use one of them for your needs. > > > --- > Daniel K. O. > > > > > > > _______________________________________________________ > Yahoo! doce lar. Fa=E7a do Yahoo! sua homepage. > http://br.yahoo.com/homepageset.html > > > |
From: S. M. H. <Mit...@an...> - 2005-12-19 06:19:34
|
lordSauron wrote: > On 12/17/05, Jason Benjamin <red...@ya...> wrote: > >>What is the use of pointers, linked lists, >>polymorphism,and operator overloading? > [....] > I don't know anything about linked lists yet, so I can't speak for that. I think of linked lists as "homogeneous array elements not contiguous in memory" (homogeneity of the array elements is not strictly required, but is typical). I believe they are generally useful at runtime, in which structures are dynamically allocated and de-allocated when necessary, and it is considered less efficient to allocate large memory blocks at initialization in anticipation of your memory needs. Singly linked lists would be useful if there is a continual need to enumerate data in each "record" (that is the structure containing its fields); doubly linked lists would useful in case a lot of record/data searching is done and the list data has been ordered/sorted with each addition of a link. There are various strategies for the efficient use of linked lists. One allocate linked lists of arrays as a means of joining the end of one array to the start of a newly allocated memory block of that same array type. |
From: Daniel K. O. <dan...@ya...> - 2005-12-19 03:37:51
|
Per Westermark wrote: >Given the billions of lines of existing code without use of __VA_ARGS__, >it really isn't such an important function that it is worth it to ignore >the current language standard. > > Agreed. I was just trying to answer the original question, but I also doubt that it's really needed. As Minds Work didn't specify what problem he's trying to solve, I assume that the example posted could be easily solved with Per's first sugestion. Something like this: ----- #include <cstdarg> #include <cstdio> #define LOG log_prefix(__FILE__, __LINE__); log void log_prefix(const char *file, int line) { printf("%s:%d:\t", file, line); } // here is Per's code void log(const char *msg,...) { va_list ap; va_start(ap,msg); vprintf(msg,ap); va_end(ap); } int main() { LOG("test %u %u\n",1,2); return 0; } ----- PS: There's also the C++ way to solve it, using ostreams and operator<<, that obviously won't need a variable number of parameters. PS2: if the problem is really just logging, there are tons of C++ libraries that do just this - conveniently. Google a bit, maybe you can use one of them for your needs. --- Daniel K. O. _______________________________________________________ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html |
From: Per W. <pw...@ia...> - 2005-12-18 21:49:07
|
But then again - do _not ever_ use a vendor-specific extension unless you are _absolutely 100% sure_ that the code need _never ever_ be ported to a different compiler. Until the official standard have incorporated __VA_ARGS__ support (and more than one vendor have implemented it according to the standard), it really should not be used. Given the billions of lines of existing code without use of __VA_ARGS__, it really isn't such an important function that it is worth it to ignore the current language standard. /Per W On Sun, 18 Dec 2005, Daniel K. O. wrote: > Minds Work wrote: > > > That page said that MACRO functions with variable number of arguments > > are only available in C99 and in some C++ compilers (but not in my > > compiler :-( ) > > > Well, if you aren't using Dev-C++/MinGW maybe you'll need some other > non-standard extension provided by your compiler vendor. > MinGW/GCC accepts __VA_ARGS__ just fine on C++. > > > --- > Daniel K. O. |
From: Daniel K. O. <dan...@ya...> - 2005-12-18 20:07:29
|
Minds Work wrote: > That page said that MACRO functions with variable number of arguments > are only available in C99 and in some C++ compilers (but not in my > compiler :-( ) Well, if you aren't using Dev-C++/MinGW maybe you'll need some other non-standard extension provided by your compiler vendor. MinGW/GCC accepts __VA_ARGS__ just fine on C++. --- Daniel K. O. _______________________________________________________ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html |
From: Per W. <pw...@ia...> - 2005-12-18 17:59:29
|
No default arguments possible. /Per W On Sun, 18 Dec 2005, Minds Work wrote: > Hi Daniel, > > Thanks for the link. > > That page said that MACRO functions with variable number of arguments are > only available in C99 and in some C++ compilers (but not in my compiler := -( > ) > > So I cant use MACRO Functions with variable number of arguments, but is > there a way to se use MACRO FUNCTIONS with default args? > (like; void foo(const char* msg, int b =3D 0)) > > On 12/18/05, Daniel K. O. <dan...@ya...> wrote: > > > > Minds Work wrote: > > > > > Is there a way to change the #define LOG_INFO to receive a variable > > > number of parameters to use the new LOG->info method? > > > > > > See: > > http://david.tribble.com/text/cdiffs.htm#C99-pp-vararg > > > > > > --- > > Daniel K. O. > > > > > > > > > > > > > > _______________________________________________________ > > Yahoo! doce lar. Fa=E7a do Yahoo! sua homepage. > > http://br.yahoo.com/homepageset.html > > > > > > > |
From: Minds W. <min...@gm...> - 2005-12-18 13:09:07
|
Hi Daniel, Thanks for the link. That page said that MACRO functions with variable number of arguments are only available in C99 and in some C++ compilers (but not in my compiler :-( ) So I cant use MACRO Functions with variable number of arguments, but is there a way to se use MACRO FUNCTIONS with default args? (like; void foo(const char* msg, int b =3D 0)) On 12/18/05, Daniel K. O. <dan...@ya...> wrote: > > Minds Work wrote: > > > Is there a way to change the #define LOG_INFO to receive a variable > > number of parameters to use the new LOG->info method? > > > See: > http://david.tribble.com/text/cdiffs.htm#C99-pp-vararg > > > --- > Daniel K. O. > > > > > > > _______________________________________________________ > Yahoo! doce lar. Fa=E7a do Yahoo! sua homepage. > http://br.yahoo.com/homepageset.html > > > |
From: Per W. <pw...@ia...> - 2005-12-18 09:43:46
|
Sometimes it's possible to use a #define that doesn't take any parameters: #include <cstdarg> #include <cstdio> #define LOG log void log(const char *msg,...) { va_list ap; va_start(ap,msg); vprintf(msg,ap); va_end(ap); } int main() { LOG("test %u %u\n",1,2); return 0; } /Per W On Sun, 18 Dec 2005, Daniel K. O. wrote: > Minds Work wrote: > > > Is there a way to change the #define LOG_INFO to receive a variable > > number of parameters to use the new LOG->info method? > > > See: > http://david.tribble.com/text/cdiffs.htm#C99-pp-vararg > > > --- > Daniel K. O. > > > > > > > _______________________________________________________ > Yahoo! doce lar. Fa=E7a do Yahoo! sua homepage. > http://br.yahoo.com/homepageset.html > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=3D7637&alloc_id=3D16865&op=3Dclick > _______________________________________________ > 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 K. O. <dan...@ya...> - 2005-12-18 05:34:18
|
Minds Work wrote: > Is there a way to change the #define LOG_INFO to receive a variable > number of parameters to use the new LOG->info method? See: http://david.tribble.com/text/cdiffs.htm#C99-pp-vararg --- Daniel K. O. _______________________________________________________ Yahoo! doce lar. Faça do Yahoo! sua homepage. http://br.yahoo.com/homepageset.html |
From: lordSauron <lor...@gm...> - 2005-12-18 02:58:24
|
On 12/17/05, Jan jan <ja...@ho...> wrote: > Anyone knw how to send 6 random variable (e.g XXXXXX) using visual basic > 6.0? in the devcpp list? c'mon, rather tactless... http://groups.google.com/group/progav?lnk=3Doa would be a much more appropriate list. While I personally wouldn't be so blunt, as my friend would say: "get your microsoft-contaminated code away from my computer!" > can send me any sample? pls advise! Send from where to where? Using what? Be very specific, since what you just asked would be very easy to interpret in many different ways. |
From: Jan j. <ja...@ho...> - 2005-12-18 02:34:22
|
<html><div style='background-color:'><P>hi all</P> <P>Anyone knw how to send 6 random variable (e.g XXXXXX) using visual basic 6.0?</P> <P>can send me any sample? pls advise! <BR><BR></P> <DIV> <P> </P> <P> </P></DIV></div><br clear=all><hr> <a href="http://g.msn.com/8HMBENUS/2737??PS=47575" target="_top">Find e-mail, documents and more on your PC instantly with Windows Desktop SearchFREE!</a> </html> |
From: Minds W. <min...@gm...> - 2005-12-18 01:42:13
|
Hi, I know we can #define "functions" in C/C++, like this : #define LOG_INFO(msg) if(LOG->isInfoEnabled()) { LOG->info(__FILE__, __LINE__, msg);} We use this #define to simplify the LOG code. But now we change the info method to receive a variable number of parameter= s (so the info can used like the printf function), the info signature changed from: void info(const* char file, int line, const char* msg); to: void info(const* char file, int line, const char* msg, ...); Is there a way to change the #define LOG_INFO to receive a variable number of parameters to use the new LOG->info method? []s Freddy |
From: lordSauron <lor...@gm...> - 2005-12-18 00:41:37
|
On 12/17/05, Jason Benjamin <red...@ya...> wrote: > What is the use of pointers, linked lists, > polymorphism,and operator overloading? Well, these things are all indespensible. You don't have to use them at every possible chance, but they can make life much easier. First, the thing I do know a bit about, is pointers. Coming from Java, this is a really cool thing. In Java, unless you're using a global variable, you have to return a object/variable if you want to keep any changes made to it during a function's execution. There isn't a easy way to keep the changes made to multiple variables, except by using arrays. Mixed object/variable types? Things can get very complex very quickly. Enter pointers. By using a pointer you can directly use a variable. This can be dangerous, but it can also be very powerful. I don't know anything about linked lists yet, so I can't speak for that. Polymorphism is very powerful. Look at virtual functions and you'll quickly find it's realy strength. Operator overloading is indespensible. Consider the "=3D" operator. it's actually overloaded to work with multiple data types. All these things have purposes. While you and I might not understand all of them, they are there for a reason. |
From: Per W. <pw...@ia...> - 2005-12-18 00:34:00
|
Pointers, linked lists and polymorphism allows you to dynamically allocate and create data structures while the program is running - for example to handle end-user commands. Operator overloading is mainly to allow cleaner code, thereby keeping down the maintenance costs. Where to find info how to use the concepts? Google of course... /Per W On Sat, 17 Dec 2005, Jason Benjamin wrote: > What is the use of pointers, linked lists, > polymorphism,and operator overloading? > > If useful, how are they useful and where do I find > good tutorials on these subjects? > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > _______________________________________________ > 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: Jason B. <red...@ya...> - 2005-12-17 23:19:45
|
What is the use of pointers, linked lists, polymorphism,and operator overloading? If useful, how are they useful and where do I find good tutorials on these subjects? |
From: Eric R. <eri...@cl...> - 2005-12-17 08:03:13
|
No why should I, I have not done the group any harm ----- Original Message -----=20 From: David Miller=20 To: Dev...@li...=20 Sent: Thursday, December 15, 2005 4:14 AM Subject: [Dev-C++] (no subject) Unsubscrbe This address |
From: Per W. <pw...@ia...> - 2005-12-17 02:37:10
|
Make a version of showMessage that takes a va_list instead of ellipsis. void showMessage(int level,const char* message,va_list ap) { printf("Level is %d\n",level); printf("Message is '"); vprintf(message,ap); printf("'\n"); } void showMessage(int level,const char* message,...) { va_list ap; va_start(ap,message); showMessage(level,message,ap); va_end(ap); } void showMessage(const char* message,...) { va_list ap; va_start(ap,message); showMessage(0,message,ap); va_end(ap); } /Per W On Wed, 14 Dec 2005, Minds Work wrote: > Hi > I Have a function with Variable Argument List, that work fine: > > void showMessage(int level, const char * message, ...); > > But now I want to make a similiar function > > void showMessage(const char * message, ...); > > that calls the first one, passing a default level argment, but I don't find > a way to pass the Variable Argument List ( the ... ) from the new foo > funtion to the old one... > Is there a way to do this? > > []s > Freddy > |
From: Noorez K. <lor...@ho...> - 2005-12-17 01:40:11
|
I have a program that needs to read in a file only 500 chars at a time. I found this example in a tutorial but am confused about a part of it. ifstream file ("example.txt", ios::in|ios::binary|ios::ate); if (file.is_open()) { size = file.tellg(); memblock = new char [size]; file.seekg (0, ios::beg); file.read (memblock, size); file.close(); ... When file.read() is called, does it move the file pointer, or do i have to do it? If i have to move it to read the next 500 chars, would i set the pointer at the value 500? _________________________________________________________________ Take charge with a pop-up guard built on patented Microsoft® SmartScreen Technology http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines Start enjoying all the benefits of MSN® Premium right now and get the first two months FREE*. |