dev-cpp-users Mailing List for Dev-C++
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
(9) |
2
(5) |
3
(7) |
4
(1) |
|
5
(1) |
6
(4) |
7
(8) |
8
(7) |
9
(10) |
10
(1) |
11
(7) |
|
12
(6) |
13
(6) |
14
(2) |
15
(8) |
16
(3) |
17
(2) |
18
(6) |
|
19
(6) |
20
|
21
(14) |
22
(5) |
23
|
24
(5) |
25
(5) |
|
26
(3) |
27
(12) |
28
(4) |
29
(4) |
30
(7) |
|
|
|
From: Per W. <pw...@ia...> - 2004-09-06 21:50:02
|
Please enlighten a novice: How can it be guaranteed that you can mix two different IO libraries and still get 100% function? Please _do not_ use both IO libraries for input from same stream. Flushing output is a performance loss but works. No characters gets lost and the flush solves the problem with output through the two libraries getting incorrectly mixed with each other. Flushing of input is a lossy project - throwing away characters. You just can't throw away characters eaten by one IO library and then expect the other IO library to not be affected. In some special circumstances you might get a program to work with a mix of C and C++ input from the console. However, if you change to another compiler or move the code to another OS, you don't know how your program will behave. Different implementations of the libraries behaves differently. However, this isn't a problem: If you use just C or just C++ for a specific stream, you are using the libraries as they are indended, and then they will behave as expected. The problem is similar to trying to set output position of a file with fseek(FILE*,...) and then use a output stream to write information. The output stream doesn't know about the fseek() and the output gets written to the wrong location. If we think about standards: The C++ standard can't have full control over the internals of the C library, while the C standard obviously haven't any control over the C++ libraries. So, I repeat it once more: Avoid mixing getche() with cin! In a win32 console, you can always use SetConsoleMode() with the ENABLE_ECHO_INPUT flag to control input echo. /Per W On Mon, 6 Sep 2004, Noorez Kassam wrote: > How do I flush the input buffer after using getch() or getche()? I use > cin.sync() after using cin? How can I do it for the other functions? > > _________________________________________________________________ > Take advantage of powerful junk e-mail filters built on patented Microsof= t=AE > SmartScreen Technology. > http://join.msn.com/?pgmarket=3Den-ca&page=3Dbyoa/prem&xAPID=3D1994&DI=3D= 1034&SU=3Dhttp://hotmail.com/enca&HL=3DMarket_MSNIS_Taglines > Start enjoying all the benefits of MSN=AE Premium right now and get the > first two months FREE*. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=3D5047&alloc_id=3D10808&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: Noorez K. <dar...@ho...> - 2004-09-06 20:02:37
|
How do I flush the input buffer after using getch() or getche()? I use cin.sync() after using cin? How can I do it for the other functions? _________________________________________________________________ Take advantage of powerful junk e-mail filters 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*. |
|
From: Per W. <pw...@ia...> - 2004-09-06 09:30:38
|
1) The complete error messages are:
fnkptr.cpp:29: error: assuming pointer to member `void Dog::Speak() const'
fnkptr.cpp:29: error: (a pointer to member can only be formed with `&Dog::Speak() const')
Just add a & before eacn function name, just as the error message suggest,
and the compiler will be happy.
2) Notice that Dev-C++ is an integrated development environment, not a
compiler. It is the gcc team - or possibly the MinGW team - that is
responsible for which error messages are emitted by the compiler. By the
way, 99.9% if the error messages I have seen have been quite obvious.
3) windef.h is a file seldom directly included in a program. However, a
number of other include files recursively requests the windef.h file. If
you check again, you should be able to find out why the compiler mentioned
it. The compiler never makes this kind of mistake. The only reason it said
BOOL was already defined in windef.h was that the program directly or
indirectly did include windef.h
/Per W
On Sun, 5 Sep 2004, Roger Furer wrote:
> Aloha from Honolulu,
> The following was taken from Sams Teach Yourself C++ and refuses to
> compile. The compiler reports the error at the line following
> "Dog::PlayDead" which is the closing brace and semi-colon for the "PDF
> DogFunctions...". I have marked it with an exclamation point ! here.
> While I do need to know what the code's problem is, more vexing is that
> in the compiler report window under messages is listed "assuming" and on
> the next line "(a". Nowhere have I been able to find a list of the
> various messages. I looked under the Help window of the program
> (Version 4.9.8.0) and also on the Bloodshed site, but no luck there
> either. I would suggest that a comprehensive list of error messages
> would benefit most everyone using these programs.
> A further note: earlier in the lesson was a line: enum BOOL {FALSE,
> TRUE}; that generated the folowing error messages: "conflicting" and
> then: (copied from the compiler report window)
> 227 C:\Dev-Cpp\include\windef.h previous declaration as `typedef
> WINBOOL BOOL'
> My solution was to comment it out, but why did the message appear
> when windef.h was never included in the code?
> Thanks in advance,
> Mahalo,
> Roger
>
>
> //Listing 20.10 Array of pointers to member functions
> #include <iostream>
> class Dog
> {
> public:
> void Speak()const { std::cout << "Woof!\n"; }
> void Move() const { std::cout << "Walking to heel...\n"; }
> void Eat() const { std::cout << "Gobbling food...\n"; }
> void Growl() const { std::cout << "Grrrrr\n"; }
> void Whimper() const { std::cout << "Whining noises...\n"; }
> void RollOver() const { std::cout << "Rolling over...\n"; }
> void PlayDead() const
> { std::cout << "Is this the end of Little Caeser?\n"; }
> };
>
> typedef void (Dog::*PDF)()const ;
>
> int main()
> {
> const int MaxFuncs = 7;
> PDF DogFunctions[MaxFuncs] =
> { Dog::Speak,
> Dog::Move,
> Dog::Eat,
> Dog::Growl,
> Dog::Whimper,
> Dog::RollOver,
> Dog::PlayDead
> ! };
> Dog* pDog =0;
> int Method;
> bool fQuit = false;
> while (!fQuit)
> {
> std::cout << "(0)Quit (1)Speak (2)Move (3)Eat (4)Growl";
> std::cout << " (5)Whimper (6)Roll Over (7)Play Dead: ";
> std::cin >> Method;
> if (Method == 0)
> {
> fQuit = true;
> break;
> }
> else
> {
> pDog = new Dog;
> (pDog->*DogFunctions[Method-1])();
> delete pDog;
> }
> }
> return 0;
> }
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=5047&alloc_id=10808&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: Roger F. <ra...@ha...> - 2004-09-06 00:08:00
|
Aloha from Honolulu,
The following was taken from Sams Teach Yourself C++ and refuses to
compile. The compiler reports the error at the line following
"Dog::PlayDead" which is the closing brace and semi-colon for the "PDF
DogFunctions...". I have marked it with an exclamation point ! here.
While I do need to know what the code's problem is, more vexing is that
in the compiler report window under messages is listed "assuming" and on
the next line "(a". Nowhere have I been able to find a list of the
various messages. I looked under the Help window of the program
(Version 4.9.8.0) and also on the Bloodshed site, but no luck there
either. I would suggest that a comprehensive list of error messages
would benefit most everyone using these programs.
A further note: earlier in the lesson was a line: enum BOOL {FALSE,
TRUE}; that generated the folowing error messages: "conflicting" and
then: (copied from the compiler report window)
227 C:\Dev-Cpp\include\windef.h previous declaration as `typedef
WINBOOL BOOL'
My solution was to comment it out, but why did the message appear
when windef.h was never included in the code?
Thanks in advance,
Mahalo,
Roger
//Listing 20.10 Array of pointers to member functions
#include <iostream>
class Dog
{
public:
void Speak()const { std::cout << "Woof!\n"; }
void Move() const { std::cout << "Walking to heel...\n"; }
void Eat() const { std::cout << "Gobbling food...\n"; }
void Growl() const { std::cout << "Grrrrr\n"; }
void Whimper() const { std::cout << "Whining noises...\n"; }
void RollOver() const { std::cout << "Rolling over...\n"; }
void PlayDead() const
{ std::cout << "Is this the end of Little Caeser?\n"; }
};
typedef void (Dog::*PDF)()const ;
int main()
{
const int MaxFuncs = 7;
PDF DogFunctions[MaxFuncs] =
{ Dog::Speak,
Dog::Move,
Dog::Eat,
Dog::Growl,
Dog::Whimper,
Dog::RollOver,
Dog::PlayDead
! };
Dog* pDog =0;
int Method;
bool fQuit = false;
while (!fQuit)
{
std::cout << "(0)Quit (1)Speak (2)Move (3)Eat (4)Growl";
std::cout << " (5)Whimper (6)Roll Over (7)Play Dead: ";
std::cin >> Method;
if (Method == 0)
{
fQuit = true;
break;
}
else
{
pDog = new Dog;
(pDog->*DogFunctions[Method-1])();
delete pDog;
}
}
return 0;
}
|