dev-cpp-users Mailing List for Dev-C++ (Page 526)
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: Luigi S. <gi...@li...> - 2002-09-13 23:15:25
|
At 21.05 09/13/02 +0200, Carlos Garc=EDa del Monte <cg...@wo...> wrote:
>With an experiment with a text editor made with a simple edit control,
>I've found some files, like winerror.h, where the text displayed has no
>new ines, instead it has a giant line with vertical bars where the
>newline should be. I tried write a small program which reads the file
>until the second line has begun and returns each character behind the
>numeric value, but in the new line it puts in the console the value 10,
>which is the usual of the newline. And in other place I found that some
>file has value 13 where the newlines are, so now I test for one of them
>and change to the other, but that doesn't solve the problem, what it
>makes is that all files has a vertical bar where the newline should be,
>and I don't find the way to make the program show newline in those
>places.
>Any idea?
>Thanks.
As Horst says, you are dealing with some Unix file which was "binary"=20
copied to Windows. Beside his solution, surely the quickest, here is my=20
idea. Hope it works! :)
As I said, the Unix file was "binary copied" to Windows, so Unix newlines=20
(LF) where not translated to Dos (CR LF). Now, if one reads the file and=20
then writes it again, using some simple program compiled on a Windows=20
system, then the copy should be OK. In other words, the "stdio" of Windows,=
=20
knows that on Dos systems, newlines are sequences of CR LF, so when asked=20
to write an LF, actually a CR LF sequence is emitted.
Here is the simplest version of a copy program I can think of, try it and=20
let us know.
dosfy.c
-------
#include <stdio.h>
int
main()
{
int c;
while ((c =3D getchar()) !=3D EOF)
putchar(c);
return 0;
}
--
gisan
|
|
From: Jorge A. <jor...@ep...> - 2002-09-13 22:33:57
|
I've experimented the same issue. Edit manually the YourLanguage.lng file following the English,lng guides. |
|
From: Luigi S. <gi...@li...> - 2002-09-13 22:25:35
|
Hello all, I've downloaded "new" MinGW gcc 3.2 to use it instead of "old" Mingw gcc 2.95.2. As I happen to use "gcc" from the command line, I've noticed the following change. Say that "c:\test\hello.cpp" is the famous "hello world" program, also, suppose the semicolon, after the string literal "Hello world!\n", is missing. When the command: gcc -c c:\test\hello.cpp is issued, one expects an error message of the type: FILE:LINE: MESSAGE where FILE is: c:\test\hello.cpp if "old" gcc is used c:/test/hello.cpp if "new" gcc is used On Win98SE, I would like to have paths written in Windows style, and so tried a simple pipe: gcc -c c:\test\hello.cpp | reverse_slashes where "reverse_slashes" is a program turning all slashes into backslashes. It does not work, since, gcc prints error messages on the standard error stream The next thing I thought of is: gcc -c c:\test\hello.cpp 2>&1 | reverse_slashes but that does not work either, because "command.com" is not "bash"! Any suggestion is welcome. TIA -- gisan |
|
From: <h.r...@gm...> - 2002-09-13 20:21:34
|
> With an experiment with a text editor made with a simple edit control, > I've found some files, like winerror.h, where the text displayed has no > new ines, instead it has a giant line with vertical bars where the > newline should be. I tried write a small program which reads the file > until the second line has begun and returns each character behind the > numeric value, but in the new line it puts in the console the value 10, > which is the usual of the newline. And in other place I found that some > file has value 13 where the newlines are, so now I test for one of them > and change to the other, but that doesn't solve the problem, what it > makes is that all files has a vertical bar where the newline should be, > and I don't find the way to make the program show newline in those > places. > Any idea? > Thanks. this happens if you read a unix style file with a windows style editor. In windows each line ends with Carriage return and Linefeed, in Unix only with Line Feed. With a editor like e.g. TextPad you can read both and convert it. greetings Horst -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net |
|
From: Carlos d. M. <cg...@wo...> - 2002-09-13 19:06:35
|
The bug consists in that I set spanish language, then I run a program from Dev, and due to an error on it the program must be closed by windows, and then Dev has restored the english language, I shall go to environment, change from spanish to english, close dev and choose spanish again. |
|
From: Carlos d. M. <cg...@wo...> - 2002-09-13 19:05:27
|
With an experiment with a text editor made with a simple edit control, I've found some files, like winerror.h, where the text displayed has no new ines, instead it has a giant line with vertical bars where the newline should be. I tried write a small program which reads the file until the second line has begun and returns each character behind the numeric value, but in the new line it puts in the console the value 10, which is the usual of the newline. And in other place I found that some file has value 13 where the newlines are, so now I test for one of them and change to the other, but that doesn't solve the problem, what it makes is that all files has a vertical bar where the newline should be, and I don't find the way to make the program show newline in those places. Any idea? Thanks. |
|
From: PhrostByte <Phr...@so...> - 2002-09-13 15:09:43
|
Okay, I'm new to directories in C - I just found out how to open/list them basically. I looked in the glibc manual (a lifesaver, that is!!) and came across S_ISDIR() but that doesn't seem to work for me. I'm trying to tell the difference between folder and file so I don't crash by fopen()ing a folder. Can somebody please help? Thanks in advance |
|
From: Abhijit S. <mu...@gm...> - 2002-09-13 14:03:27
|
----- Original Message -----
From: "Evandro Humberto Rodrigues" <ero...@ro...>
To: <Dev...@li...>
Sent: Wednesday, September 11, 2002 9:43 PM
Subject: [Dev-C++] Modem Configuration
Hi people,
I trying to produce a little program to configurate my external modem
(USR 56K).
First I create a file with CreateFile() function, then I used
WriteFile() function to send the configuration strings to modem.
For test I sent a string like "ATDT 9092" to put the modem to dial to
the number 9092, but the ligths on the modem blink but modem does not make
the call...
Using HYPERTERMINAL, this work fine.
What is wrong?
I put the program below if someone can help me I will be grateful.
---------- program -------------------------
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <string>
int main(int argc, char *argv[])
{
DCB dcb;
HANDLE hCom;
BOOL fSuccess;
LPCVOID buffer;
char *pcCommPort = "COM2";
using namespace std;
hCom = CreateFile( pcCommPort,
GENERIC_READ | GENERIC_WRITE,
0, // comm devices must be opened w/exclusive-access
NULL, // no security attributes
OPEN_EXISTING, // comm devices must use OPEN_EXISTING
0, // not overlapped I/O
NULL // hTemplate must be NULL for comm devices
);
if (hCom == INVALID_HANDLE_VALUE) {
// Handle the error.
printf ("CreateFile failed with error %d.\n", GetLastError());
return (1);
}
// We will build on the current configuration, and skip setting the size
// of the input and output buffers with SetupComm.
fSuccess = GetCommState(hCom, &dcb);
if (!fSuccess) {
// Handle the error.
printf ("GetCommState failed with error %d.\n", GetLastError());
return (2);
}
// Fill in the DCB: baud=57,600 bps, 8 data bits, no parity, and 1 stop
bit.
dcb.BaudRate = CBR_57600; // set the baud rate
dcb.ByteSize = 8; // data size, xmit, and rcv
dcb.Parity = NOPARITY; // no parity bit
dcb.StopBits = ONESTOPBIT; // one stop bit
fSuccess = SetCommState(hCom, &dcb);
if (!fSuccess) {
// Handle the error.
printf ("SetCommState failed with error %d.\n", GetLastError());
return (3);
}
string codigo = "ATDT 9092\n";
DWORD nBytes;
string lida = "1234567890123456789012345678901";
if (WriteFile(hCom, &codigo, 10, &nBytes, NULL))
cout << "Foram escritos " << nBytes << " Bytes" << endl;
if (ReadFile(hCom, &lida, 10, &nBytes, NULL))
cout << "String lida -> " << lida << " Bytes lidos " << nBytes << endl;
system("PAUSE");
return (0);
}
-------------------------------------------------------
I don't know much about what you're doing, but I think you should try
replacing this line:
if (WriteFile(hCom, &codigo, 10, &nBytes, NULL))
with
if (WriteFile(hCom, codigo.c_str(), codigo.size(), &nBytes, NULL))
because you're passing the address of the class instance in the first case,
and it's different from the contents of the buffer. Same thing with
ReadFile... you can't use `string's. Try replacing the usage of the string
class with normal ASCIIZ buffers... it should work then.
There's also some incorrect usage of namespace stuff that might work in this
version of GCC, but not in all ANSI compilers... I think Ioannis will be
happy to point them out if you want... :)
HTH.
___________________________________________________________
Abhijit Shylanath
E-mail: mu...@gm... || ibr...@bi...
Web-site: http://mudeth.tripod.com/
|
|
From: <Car...@te...> - 2002-09-13 10:43:04
|
Hi all, im thinking about to port SynEdit to C++. Does anybody know if such a port of SynEdit allready exists? The second question is: Use Dev++ SynEdit from Sourceforge or differs the version in DEV++. If a port doesn't exist where is the Best place to go? SynEdit-Page? Anybody out There who would help? Best regards, Carsten Breuer |
|
From: Ramana K. <ra...@my...> - 2002-09-12 12:07:36
|
a while ago i did... i can go look around if you really want i recommend looking up the Speech API on msdn, it has examples -----Original Message----- From: dev...@li... [mailto:dev...@li...]On Behalf Of Christian Wallukat Sent: Wednesday, 11 September 2002 8:03 PM To: Dev-Cpp-Users@Lists. Sourceforge. Net (E-Mail) Subject: [Dev-C++] Text to speech Hi list, thanks to all hwo helped me, but I have another question: Has somebody already "played" with the M$ texttospeech stuff ? I know that there is some internal tts, but i dont know how to use it... Could somebody help ???? Kind r Christian ------------------------------------------------------- In remembrance www.osdn.com/911/ _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |
|
From: Evandro H. R. <ero...@ro...> - 2002-09-12 11:54:35
|
I found the problem...
In the line where is write: string codigo =3D "ATDT 9092\n";
Needs to be: char[] =3D "ATDT 9092\r\f";
The problem was the "\n" in the end of string, it is need to be "\r\f" th=
en
the modem knows that needs to execute the string.
Thanks
Evandro
----- Original Message -----
From: "Evandro Humberto Rodrigues" <ero...@ro...>
To: <Dev...@li...>
Sent: Wednesday, September 11, 2002 1:13 PM
Subject: [Dev-C++] Modem Configuration
> Hi people,
>
> I trying to produce a little program to configurate my external mod=
em
> (USR 56K).
> First I create a file with CreateFile() function, then I used
> WriteFile() function to send the configuration strings to modem.
> For test I sent a string like "ATDT 9092" to put the modem to dial =
to
> the number 9092, but the ligths on the modem blink but modem does not m=
ake
> the call...
> Using HYPERTERMINAL, this work fine.
> What is wrong?
> I put the program below if someone can help me I will be grateful.
>
> Thanks in advance
>
> --------------------------------------
> Evandro H. Rodrigues
> Ind=FAstrias ROMI S/A - Brazil
> Quality Assurance Dep F14-07
> Phone: 55-19-455-9529
> Fax: 55-19-455-9084
> email: ero...@ro...
>
> ---------- program -------------------------
>
> #include <iostream>
> #include <stdlib.h>
> #include <stdio.h>
> #include <windows.h>
> #include <string>
>
> int main(int argc, char *argv[])
> {
> DCB dcb;
> HANDLE hCom;
> BOOL fSuccess;
> LPCVOID buffer;
> char *pcCommPort =3D "COM2";
>
> using namespace std;
>
> hCom =3D CreateFile( pcCommPort,
> GENERIC_READ | GENERIC_WRITE,
> 0, // comm devices must be opened
w/exclusive-access
> NULL, // no security attributes
> OPEN_EXISTING, // comm devices must use OPEN_EXIST=
ING
> 0, // not overlapped I/O
> NULL // hTemplate must be NULL for comm devices
> );
>
> if (hCom =3D=3D INVALID_HANDLE_VALUE) {
> // Handle the error.
> printf ("CreateFile failed with error %d.\n", GetLastError());
> return (1);
> }
>
> // We will build on the current configuration, and skip setting the s=
ize
> // of the input and output buffers with SetupComm.
>
> fSuccess =3D GetCommState(hCom, &dcb);
>
> if (!fSuccess) {
> // Handle the error.
> printf ("GetCommState failed with error %d.\n", GetLastError());
> return (2);
> }
>
> // Fill in the DCB: baud=3D57,600 bps, 8 data bits, no parity, and 1 =
stop
> bit.
>
> dcb.BaudRate =3D CBR_57600; // set the baud rate
> dcb.ByteSize =3D 8; // data size, xmit, and rcv
> dcb.Parity =3D NOPARITY; // no parity bit
> dcb.StopBits =3D ONESTOPBIT; // one stop bit
>
> fSuccess =3D SetCommState(hCom, &dcb);
>
> if (!fSuccess) {
> // Handle the error.
> printf ("SetCommState failed with error %d.\n", GetLastError());
> return (3);
> }
>
> string codigo =3D "ATDT 9092\n";
> DWORD nBytes;
> string lida =3D "1234567890123456789012345678901";
>
> if (WriteFile(hCom, &codigo, 10, &nBytes, NULL))
> cout << "Foram escritos " << nBytes << " Bytes" << endl;
>
> if (ReadFile(hCom, &lida, 10, &nBytes, NULL))
> cout << "String lida -> " << lida << " Bytes lidos " << nBytes <<
endl;
>
> system("PAUSE");
> return (0);
> }
>
>
>
> -------------------------------------------------------
> In remembrance
> www.osdn.com/911/
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: MEGHAZI F. <Fab...@si...> - 2002-09-12 08:44:34
|
Hi all,
At work, i'm forced to use ASP scripting language for web-based =
applications.
(I use Jscript instead of the default VBscript)
I'm new at it (used to work with php before) and it seems that every =
time you
want to do something a little more complicated, you need an Active =
server component (sending a mail, doing an http request, ...) because =
in most case, we don't have a
low level control. But in the ASP world, 95% of these components are =
commercial,
even if the task to be done is ridiculous.
So, I wanna know if it was possible (or if someone here already did it) =
to
compile Active server component with Devcpp.
Is there a devpack for this ?
PS: i'm new to devcpp too :))
-----Original Message-----
From: Evandro Humberto Rodrigues [mailto:ero...@ro...]
Sent: mercredi 11 septembre 2002 18:13
To: Dev...@li...
Subject: [Dev-C++] Modem Configuration
Hi people,
I trying to produce a little program to configurate my external =
modem
(USR 56K).
First I create a file with CreateFile() function, then I used
WriteFile() function to send the configuration strings to modem.
For test I sent a string like "ATDT 9092" to put the modem to dial =
to
the number 9092, but the ligths on the modem blink but modem does not =
make
the call...
Using HYPERTERMINAL, this work fine.
What is wrong?
I put the program below if someone can help me I will be grateful.
Thanks in advance
--------------------------------------
Evandro H. Rodrigues
Ind=FAstrias ROMI S/A - Brazil
Quality Assurance Dep F14-07
Phone: 55-19-455-9529
Fax: 55-19-455-9084
email: ero...@ro...
---------- program -------------------------
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <string>
int main(int argc, char *argv[])
{
DCB dcb;
HANDLE hCom;
BOOL fSuccess;
LPCVOID buffer;
char *pcCommPort =3D "COM2";
using namespace std;
hCom =3D CreateFile( pcCommPort,
GENERIC_READ | GENERIC_WRITE,
0, // comm devices must be opened =
w/exclusive-access
NULL, // no security attributes
OPEN_EXISTING, // comm devices must use =
OPEN_EXISTING
0, // not overlapped I/O
NULL // hTemplate must be NULL for comm devices
);
if (hCom =3D=3D INVALID_HANDLE_VALUE) {
// Handle the error.
printf ("CreateFile failed with error %d.\n", GetLastError());
return (1);
}
// We will build on the current configuration, and skip setting the =
size
// of the input and output buffers with SetupComm.
fSuccess =3D GetCommState(hCom, &dcb);
if (!fSuccess) {
// Handle the error.
printf ("GetCommState failed with error %d.\n", GetLastError());
return (2);
}
// Fill in the DCB: baud=3D57,600 bps, 8 data bits, no parity, and 1 =
stop
bit.
dcb.BaudRate =3D CBR_57600; // set the baud rate
dcb.ByteSize =3D 8; // data size, xmit, and rcv
dcb.Parity =3D NOPARITY; // no parity bit
dcb.StopBits =3D ONESTOPBIT; // one stop bit
fSuccess =3D SetCommState(hCom, &dcb);
if (!fSuccess) {
// Handle the error.
printf ("SetCommState failed with error %d.\n", GetLastError());
return (3);
}
string codigo =3D "ATDT 9092\n";
DWORD nBytes;
string lida =3D "1234567890123456789012345678901";
if (WriteFile(hCom, &codigo, 10, &nBytes, NULL))
cout << "Foram escritos " << nBytes << " Bytes" << endl;
if (ReadFile(hCom, &lida, 10, &nBytes, NULL))
cout << "String lida -> " << lida << " Bytes lidos " << nBytes << =
endl;
system("PAUSE");
return (0);
}
-------------------------------------------------------
In remembrance
www.osdn.com/911/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|
|
From: Evandro H. R. <ero...@ro...> - 2002-09-11 16:13:40
|
Hi people,
I trying to produce a little program to configurate my external modem
(USR 56K).
First I create a file with CreateFile() function, then I used
WriteFile() function to send the configuration strings to modem.
For test I sent a string like "ATDT 9092" to put the modem to dial to
the number 9092, but the ligths on the modem blink but modem does not mak=
e
the call...
Using HYPERTERMINAL, this work fine.
What is wrong?
I put the program below if someone can help me I will be grateful.
Thanks in advance
--------------------------------------
Evandro H. Rodrigues
Ind=FAstrias ROMI S/A - Brazil
Quality Assurance Dep F14-07
Phone: 55-19-455-9529
Fax: 55-19-455-9084
email: ero...@ro...
---------- program -------------------------
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>
#include <string>
int main(int argc, char *argv[])
{
DCB dcb;
HANDLE hCom;
BOOL fSuccess;
LPCVOID buffer;
char *pcCommPort =3D "COM2";
using namespace std;
hCom =3D CreateFile( pcCommPort,
GENERIC_READ | GENERIC_WRITE,
0, // comm devices must be opened w/exclusive-acc=
ess
NULL, // no security attributes
OPEN_EXISTING, // comm devices must use OPEN_EXISTIN=
G
0, // not overlapped I/O
NULL // hTemplate must be NULL for comm devices
);
if (hCom =3D=3D INVALID_HANDLE_VALUE) {
// Handle the error.
printf ("CreateFile failed with error %d.\n", GetLastError());
return (1);
}
// We will build on the current configuration, and skip setting the siz=
e
// of the input and output buffers with SetupComm.
fSuccess =3D GetCommState(hCom, &dcb);
if (!fSuccess) {
// Handle the error.
printf ("GetCommState failed with error %d.\n", GetLastError());
return (2);
}
// Fill in the DCB: baud=3D57,600 bps, 8 data bits, no parity, and 1 st=
op
bit.
dcb.BaudRate =3D CBR_57600; // set the baud rate
dcb.ByteSize =3D 8; // data size, xmit, and rcv
dcb.Parity =3D NOPARITY; // no parity bit
dcb.StopBits =3D ONESTOPBIT; // one stop bit
fSuccess =3D SetCommState(hCom, &dcb);
if (!fSuccess) {
// Handle the error.
printf ("SetCommState failed with error %d.\n", GetLastError());
return (3);
}
string codigo =3D "ATDT 9092\n";
DWORD nBytes;
string lida =3D "1234567890123456789012345678901";
if (WriteFile(hCom, &codigo, 10, &nBytes, NULL))
cout << "Foram escritos " << nBytes << " Bytes" << endl;
if (ReadFile(hCom, &lida, 10, &nBytes, NULL))
cout << "String lida -> " << lida << " Bytes lidos " << nBytes << end=
l;
system("PAUSE");
return (0);
}
|
|
From: Zodiaq <zo...@ac...> - 2002-09-11 14:42:01
|
Hello Vadim and all Dev-C++ users, Wednesday, September 11, 2002, 3:59:42 PM, Vadim wrote as follows: VV> Just testing, do not open... Don't you think that you should give this as a subject?? When in body it is already opened! VV> Why Linux? 'cause it think in a different way... So go to psyhiatrist... ;-] VV> --------------------------------- VV> Yahoo! - We Remember Bullshit... VV> 9-11: A tribute to the more than 3,000 lives lost They could remember at least how many people lost their lives... not just over 3000! Give them more than 1 minute of silence... think about how many of them died - as many as all the people you know? As all your neigbourhood? No, many more! :-(( -- regards, Zodiaq |
|
From: Vadim V. <mr_...@ya...> - 2002-09-11 13:59:42
|
Just testing, do not open... Why Linux? 'cause it think in a different way... --------------------------------- Yahoo! - We Remember 9-11: A tribute to the more than 3,000 lives lost |
|
From: Reid T. <Rei...@at...> - 2002-09-11 12:50:14
|
<http://www.tallahassee.cc.fl.us/dept/acsu/mc/docs/HTML/BUSFLOW.HTM> http://www.tallahassee.cc.fl.us/dept/acsu/mc/docs/HTML/BUSFLOW.HTM formulas listed at the bottom of the page. Do search on finance formulas -----Original Message----- From: Mitchell, Tamra (HNA) [mailto:Tam...@hj...] Sent: Wednesday, September 11, 2002 8:32 AM To: 'dev...@li...' Subject: [Dev-C++] Calculating interest Can anyone point me to a same program that calculates interest, and determines number of months it will take to pay off a loan. I have all my variables set but am not sure how to set up the loop. I need to calculate months it will take to pay off a loan for $1000 ay 18% interest with payment of $50/month #include <iostream>=20 using namespace std;=20 void main()=20 {=20 double payment =3D 50;=20 double loan_amt =3D 1000;=20 double const interest_rate =3D.18;=20 double yrly_int =3D (loan_amt*interest_rate);=20 double monthly_int =3D(yrly_int/12);=20 double principle=3D (payment - monthly_int) ;=20 double new_bal =3D (loan_amt-principle);=20 }=20 Tamra Y. Mitchell=20 Database & Operating Systems Analyst=20 412-237-5232 - Work=20 412-996-9078 - Cell=20 |
|
From: Mitchell, T. (HNA) <Tam...@hj...> - 2002-09-11 12:37:23
|
Can anyone point me to a same program that calculates interest, and
determines number of months it will take to pay off a loan.
I have all my variables set but am not sure how to set up the loop. I need
to calculate months it will take to pay off a loan for $1000 ay 18%
interest with payment of $50/month
#include <iostream>
using namespace std;
void main()
{
double payment = 50;
double loan_amt = 1000;
double const interest_rate =.18;
double yrly_int = (loan_amt*interest_rate);
double monthly_int =(yrly_int/12);
double principle= (payment - monthly_int) ;
double new_bal = (loan_amt-principle);
}
Tamra Y. Mitchell
Database & Operating Systems Analyst
412-237-5232 - Work
412-996-9078 - Cell
|
|
From: Christian W. <Chr...@vo...> - 2002-09-11 10:02:37
|
Hi list, thanks to all hwo helped me, but I have another question: Has somebody already "played" with the M$ texttospeech stuff ? I know that there is some internal tts, but i dont know how to use it... Could somebody help ???? Kind r Christian |
|
From: Vlada D. <dj...@im...> - 2002-09-11 07:35:52
|
Hello,Abhijit
Thanks a lot for your help about this. I would've never thought about
it. I was just thinking about giving up, but now I think I'll keep
trying.
Thanks again!!!
-----Original Message-----
From: Abhijit Shylanath [mailto:mu...@gm...]
Sent: utorak, 10. septembar 2002 17:16
To: Vlada Djurovic; Dev-C++ Mailing List
Subject: Re: [Dev-C++] no menu
----- Original Message -----
From: "Vlada Djurovic" <dj...@im...>
To: "'Abhijit Shylanath'" <mu...@gm...>
Sent: Monday, September 09, 2002 1:09 PM
Subject: RE: [Dev-C++] no menu
>
>
>> Can you post some code?
>
> Sorry foe the delay, here's the code:
> Header:resource.h
> #define IDR_MENU 100
> #define ID_FILE_EXIT 110
> #define ID_DIALOG_SHOW 120
> #define ID_DIALOG_HIDE 121
>
>
> Resorce:rsFile.rc
> #include <resource.h>
> #include <windows.h>
>
> IDR_MENU MENU
> BEGIN
> POPUP "&File"
> BEGIN
> MENUITEM "E&xit",ID_FILE_EXIT
> END
> POPUP "&Dialog"
> BEGIN
> MENUITEM "&Show",ID_DIALOG_SHOW
> MENUITEM "&Hide",ID_DIALOG_HIDE
> END
> END
>
> Source:main.c
>
> #include <windows.h>
> #include <resource.h>
> LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
> char szClassName[ ] = "WindowsApp";
> int WINAPI
> WinMain (HINSTANCE hThisInstance,
> HINSTANCE hPrevInstance,
> LPSTR lpszArgument,
> int nFunsterStil)
>
> {
> HWND hwnd;
> MSG messages;
> WNDCLASSEX wincl;
> wincl.hInstance = hThisInstance;
> wincl.lpszClassName = szClassName;
> wincl.lpfnWndProc = WindowProcedure;
> wincl.style = CS_DBLCLKS;
> wincl.cbSize = sizeof (WNDCLASSEX);
>
> wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
> wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
> wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
> wincl.lpszMenuName = MAKEINTRESOURCE(IDR_MENU);
> wincl.cbClsExtra = 0;
> wincl.cbWndExtra = 0;
> wincl.hbrBackground = (HBRUSH) (COLOR_WINDOW+1);
>
>
> if (!RegisterClassEx (&wincl))
> return 0;
>
>
> hwnd = CreateWindowEx (
> WS_EX_CLIENTEDGE,
> szClassName,
> "Windows App",
> WS_OVERLAPPEDWINDOW,
> CW_USEDEFAULT,
> CW_USEDEFAULT,
> 544,
> 375,
> HWND_DESKTOP,
> NULL,
> hThisInstance,
> NULL
> );
>
>
> ShowWindow (hwnd, nFunsterStil);
> UpdateWindow(hwnd);
>
> while (GetMessage (&messages, NULL, 0, 0))
> {
>
> TranslateMessage(&messages);
>
> DispatchMessage(&messages);
> }
>
>
> return messages.wParam;
> }
> LRESULT CALLBACK
> WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
lParam)
> {
> switch (message)
> {
> case WM_DESTROY:
> PostQuitMessage (0);
> break;
> default:
> return DefWindowProc (hwnd, message, wParam, lParam);
> }
>
> return 0;
> }
Wherever you've specified #include <resource.h>, change it to
"resource.h"
and it should work. #include <file> searches for `file' in the standard
directories only, while #include "file" searches in the current
directory
first and then the standard directories. So, right now, it's like
`resource.h' isn't included at all, and it treats all references to the
IDs
(IDI_APPLICATION, etc.) as strings, which would be used like this:
wincl.lpszMenuName = IDR_MENU)
(note the absence of MAKEINTRESOURCE(), which converts an int into a
specially flagged string)
HTH.
PS: Please pursue this on the list, by clicking `Reply all' instead of
`Reply'... better not leave too many loose ends in the archives.
___________________________________________________________
Abhijit Shylanath
E-mail: mu...@gm... || ibr...@bi...
Web-site: http://mudeth.tripod.com/
|
|
From: <h.r...@gm...> - 2002-09-10 19:33:23
|
Hi List, i cant find the manipulators left and right anywhere (iomanip ?). Is mingw 2.0.0.3 (gcc 3.2) without it ? Thanks and greetings Horst -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net |
|
From: Abhijit S. <mu...@gm...> - 2002-09-10 15:51:43
|
> Hi List,
>
> I want to start a function in x threads e.g:
>
> I have a function print, print does nothing else as print a number
>
> void print(int i);
>
> Now I want to start 5 threads (or 30) where everey thread print another
> number.
>
> How can I realize that ??
>
Look up CreateThread().
HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes, // address of thread security
attributes
DWORD dwStackSize, // initial thread stack size, in bytes
LPTHREAD_START_ROUTINE lpStartAddress, // address of thread function
LPVOID lpParameter, // argument for new thread
DWORD dwCreationFlags, // creation flags
LPDWORD lpThreadId // address of returned thread identifier
);
|
|
From: Abhijit S. <mu...@gm...> - 2002-09-10 15:51:38
|
----- Original Message ----- From: Direcway To: dev...@li... Sent: Tuesday, September 10, 2002 9:27 AM Subject: [Dev-C++] BLOODSHED DEV C++ 64 bit Hello We would like to create the first 64 bit version of BloodShed how do we go about getting access to the source code in order to do so. We have access to the new 64 bit Windows XP system and also the Itanium 2 64 bit cpu system also. Please reply. Jerry Friend NATIVE XQ4 ------------------------------ You should ask this on the MingW32 list. Please remember that Dev-C++ is just an IDE, like a front-end, to MingW32. The compiler itself is an independant project (http://www.mingw.org/). ___________________________________________________________ Abhijit Shylanath E-mail: mu...@gm... || ibr...@bi... Web-site: http://mudeth.tripod.com/ |
|
From: Abhijit S. <mu...@gm...> - 2002-09-10 15:17:03
|
----- Original Message -----
From: "Vlada Djurovic" <dj...@im...>
To: "'Abhijit Shylanath'" <mu...@gm...>
Sent: Monday, September 09, 2002 1:09 PM
Subject: RE: [Dev-C++] no menu
>
>
>> Can you post some code?
>
> Sorry foe the delay, here's the code:
> Header:resource.h
> #define IDR_MENU 100
> #define ID_FILE_EXIT 110
> #define ID_DIALOG_SHOW 120
> #define ID_DIALOG_HIDE 121
>
>
> Resorce:rsFile.rc
> #include <resource.h>
> #include <windows.h>
>
> IDR_MENU MENU
> BEGIN
> POPUP "&File"
> BEGIN
> MENUITEM "E&xit",ID_FILE_EXIT
> END
> POPUP "&Dialog"
> BEGIN
> MENUITEM "&Show",ID_DIALOG_SHOW
> MENUITEM "&Hide",ID_DIALOG_HIDE
> END
> END
>
> Source:main.c
>
> #include <windows.h>
> #include <resource.h>
> LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
> char szClassName[ ] = "WindowsApp";
> int WINAPI
> WinMain (HINSTANCE hThisInstance,
> HINSTANCE hPrevInstance,
> LPSTR lpszArgument,
> int nFunsterStil)
>
> {
> HWND hwnd;
> MSG messages;
> WNDCLASSEX wincl;
> wincl.hInstance = hThisInstance;
> wincl.lpszClassName = szClassName;
> wincl.lpfnWndProc = WindowProcedure;
> wincl.style = CS_DBLCLKS;
> wincl.cbSize = sizeof (WNDCLASSEX);
>
> wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
> wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
> wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
> wincl.lpszMenuName = MAKEINTRESOURCE(IDR_MENU);
> wincl.cbClsExtra = 0;
> wincl.cbWndExtra = 0;
> wincl.hbrBackground = (HBRUSH) (COLOR_WINDOW+1);
>
>
> if (!RegisterClassEx (&wincl))
> return 0;
>
>
> hwnd = CreateWindowEx (
> WS_EX_CLIENTEDGE,
> szClassName,
> "Windows App",
> WS_OVERLAPPEDWINDOW,
> CW_USEDEFAULT,
> CW_USEDEFAULT,
> 544,
> 375,
> HWND_DESKTOP,
> NULL,
> hThisInstance,
> NULL
> );
>
>
> ShowWindow (hwnd, nFunsterStil);
> UpdateWindow(hwnd);
>
> while (GetMessage (&messages, NULL, 0, 0))
> {
>
> TranslateMessage(&messages);
>
> DispatchMessage(&messages);
> }
>
>
> return messages.wParam;
> }
> LRESULT CALLBACK
> WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
> {
> switch (message)
> {
> case WM_DESTROY:
> PostQuitMessage (0);
> break;
> default:
> return DefWindowProc (hwnd, message, wParam, lParam);
> }
>
> return 0;
> }
Wherever you've specified #include <resource.h>, change it to "resource.h"
and it should work. #include <file> searches for `file' in the standard
directories only, while #include "file" searches in the current directory
first and then the standard directories. So, right now, it's like
`resource.h' isn't included at all, and it treats all references to the IDs
(IDI_APPLICATION, etc.) as strings, which would be used like this:
wincl.lpszMenuName = IDR_MENU)
(note the absence of MAKEINTRESOURCE(), which converts an int into a
specially flagged string)
HTH.
PS: Please pursue this on the list, by clicking `Reply all' instead of
`Reply'... better not leave too many loose ends in the archives.
___________________________________________________________
Abhijit Shylanath
E-mail: mu...@gm... || ibr...@bi...
Web-site: http://mudeth.tripod.com/
|
|
From: Christian W. <Chr...@vo...> - 2002-09-10 14:55:50
|
Hi List,
I want to start a function in x threads e.g:
I have a function print, print does nothing else as print a number
void print(int i);
Now I want to start 5 threads (or 30) where everey thread print another
number.
How can I realize that ??
Then I have a problem in a console app (MS VisStudio (sorry for bother you
with M$))
I want to start a timer:
//Function will be executed through the timer
VOID CALLBACK Timer(HWND hwnd, UINT message, UINT iTimerID, DWORD dwTime)
{
//do soething
};
SetTimer(NULL, 0, 1000, Timer);
But the timer does not start.
Does sombody have a solution ???
Kind r
Christian
|
|
From: Napoleon A. <nah...@so...> - 2002-09-10 12:57:43
|
Hi,
I have just downloaded and installed the latest mingw 2.0.0-3. Following =
the
notes from the mail by Gisan and it worked. Then I also went to
Tools->Compiler Options: "Programs" Tab and changed the entry for make =
to
mingw32-make.exe. I have since been able to compile a project of 19 =
files
without problems.
I have this problem though with a project which hither to compiled =
without
errors. Belo are the error messages:
Building Makefile: "C:\Projects\WinCalcK\Makefile.win"
Executing make...
mingw32-make.exe -f "C:\Projects\WinCalcK\Makefile.win" all
g++.exe -c FunTab.cpp -o
unTab.o -I"C:\MinGW\include" -I"C:\MinGW\include\c++" =
-I"C:\MinGW\include"
-DSTRICT -g3 -mwindows
In file included from C:/MinGW/include/windef.h:235,
from C:/MinGW/include/windows.h:48,
from
C:/MinGW/include/c++/3.2/mingw32/bits/gthr-default.h:462,
from C:/MinGW/include/c++/3.2/mingw32/bits/gthr.h:98,
from C:/MinGW/include/c++/3.2/mingw32/bits/c++io.h:37,
from C:/MinGW/include/c++/3.2/bits/fpos.h:44,
from C:/MinGW/include/c++/3.2/iosfwd:46,
from C:/MinGW/include/c++/3.2/bits/stl_algobase.h:70,
from C:/MinGW/include/c++/3.2/bits/stl_tree.h:86,
from C:/MinGW/include/c++/3.2/map:66,
from SymTab.h:4,
from FunTab.cpp:3:
C:/MinGW/include/winnt.h:2347: semicolon missing after struct =
declaration
C:/MinGW/include/winnt.h:2347: abstract declarator `
_IMAGE_AUX_SYMBOL::<anonymous struct>::<anonymous union>::<anonymous
struct>
' used as declaration
C:/MinGW/include/winnt.h:2347: namespace-scope anonymous aggregates must =
be
static
mingw32-make.exe: *** [FunTab.o] Error 1
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 04/09/2002
|