dev-cpp-users Mailing List for Dev-C++ (Page 82)
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: Erik S. <esc...@gm...> - 2006-05-10 19:29:16
|
Here is my code
#include <iostream>
#include <cstdio>
#include <string>
#include <fstream>
using namespace std;
int main(int argc,char *argv[]){
FILE* pipe=popen("ls","r");
string total;
char c;
cout<<"initialized"<<endl;
while(!feof(pipe)){
total+=fgetc(pipe);
}
fclose(pipe);
cout<<total<<endl;
return 0;
}
that code works, however, I am not trying to work with ls. I am
trying to work with "top" when I replace ls with top, the program
refuses to work
this is on a mac
thanx for any help
-Erik
|
|
From: Thymian <Th...@gm...> - 2006-05-10 10:52:26
|
Tudorache Dan schrieb: > > > Is there a Dev C++ manual with a COMPLETE description of the C > functions in Dev C++. of the libraries, which functions are contained > in which header files? > > If You anderstand German, there is a complete book dealing with this topic. Because technical German is similar to technical English, You might reed and understand it fairly well , I suppose. In my weak english translation it (the pocked book) could be titled "Reliable Apply of C Library Functions" if it where translated. Helmut Erlenkötter C Bibliotheksfunktionen sicher anwenden. (c) Rowohlt Taschenbuch Verlag 2003 415 pages cost 12,90 Euro ISBN: 3-499-61223-2 (It is from the "rororo Taschenbuchreihe Grundkurs Computerpraxis") http://www.amazon.de/exec/obidos/ASIN/3499612232/qid=1147257580/sr=1-1/ref=sr_1_2_1/028-8050538-5340503 You also could use GOOGLE to find a lot of tutorials dealing with C Library headers and functions in the web, for example: http://www.google.de/search?hl=de&q=c+library+functions&btnG=Google-Suche&meta= Gruß, Thymian |
|
From: Per W. <pw...@ia...> - 2006-05-09 20:38:47
|
Since you are using the strtok() function (a not too much liked function by the way, since it modifies the string), I assume that you are writing in C. Either use atoi() or strtol() to convert from string to number. Note that atoi() breaks at first non-numeric character, so in case you use it with a string that doesn't contain a number, you must manually check the contents of the string. strtol() will set a pointer to the first non-converted character, which helps when continuing the processing of the string. /Per W On Tue, 9 May 2006, KrowniX ()--() wrote: > Hi ... > > Hey..today I got some other problem that you may help-me...I am working t= o use the response of the ping command to do some operations....for example= : > > Resposta de 10.0.0.1: bytes=3D32 tempo=3D49ms TTL=3D250 > Resposta de 10.0.0.1: bytes=3D32 tempo=3D48ms TTL=3D250 > Resposta de 10.0.0.1: bytes=3D32 tempo=3D48ms TTL=3D250 > Resposta de 10.0.0.1: bytes=3D32 tempo=3D49ms TTL=3D250 > > I already know the function strtok() in string.h that allowed you to cut = the file as you want...and i don=B4t have problems to separate the "tempo= =3D49ms" from the rest of the file..so..that=B4s my question.. > > the strtok() function returns a char*, and I need to use that number "49"= to make some basics operations like > < .;...really simple.. but I am not = been able to do the conversion of char* to int... > > Does anyone know how do I do this?? > > Thanks....and if I found out I=B4ll post it here.. > > Krownix |
|
From: KrowniX \(\)--\(\) <kr...@ya...> - 2006-05-09 19:34:38
|
Hi ... Hey..today I got some other problem that you may help-me...I am working to use the response of the ping command to do some operations....for example: Resposta de 10.0.0.1: bytes=32 tempo=49ms TTL=250 Resposta de 10.0.0.1: bytes=32 tempo=48ms TTL=250 Resposta de 10.0.0.1: bytes=32 tempo=48ms TTL=250 Resposta de 10.0.0.1: bytes=32 tempo=49ms TTL=250 I already know the function strtok() in string.h that allowed you to cut the file as you want...and i don´t have problems to separate the "tempo=49ms" from the rest of the file..so..that´s my question.. the strtok() function returns a char*, and I need to use that number "49" to make some basics operations like > < .;...really simple.. but I am not been able to do the conversion of char* to int... Does anyone know how do I do this?? Thanks....and if I found out I´ll post it here.. Krownix --------------------------------- Abra sua conta no Yahoo! Mail - 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz. |
|
From: Per W. <pw...@ia...> - 2006-05-09 17:39:45
|
Visit the GNU home page and retrieve the manuals for the run-time library. /Per W EMA System email: pw...@ia... Per Westermark web: http://iapetus.neab.net Vargvaegen 174B phone: +46 70 214 74 48 S-906 42 Umeaa Sweden On Tue, 9 May 2006, Rohit V. Bhute wrote: > Tudorache Dan wrote: > > > The manual you recommended seems very good but is much too advanced for > > my current level (I am just beginning to study C). What I would like is > > simply a list of the C functions used by the Dev-C++ 4 compiler, and of > > course each function with explanations about its parameters, how it > > works, it which header file it is included etc. For the time being I > > want to concentrate exclusively on C. Can you recommend me a manual like > > this? (I do have some books on C, but there are some functions that are > > compiler-specific and are not described in the C books). Thank you again > > for your help! > > > > When I began, I too used books! But unfortunately, they were local ones > (from India). I would recommend Thinking In C++ by Bruce Eckel if you > were doing C++. For a beginner in C, I think the best way to get what > you want is to simply dive into the header files in the include > directory. ;) > > > -- > Rohit V. Bhute > http://rvbhute.freelinuxhost.com/wordpress > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > 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: Rohit V. B. <rv...@gm...> - 2006-05-09 15:50:11
|
Tudorache Dan wrote: > The manual you recommended seems very good but is much too advanced for > my current level (I am just beginning to study C). What I would like is > simply a list of the C functions used by the Dev-C++ 4 compiler, and of > course each function with explanations about its parameters, how it > works, it which header file it is included etc. For the time being I > want to concentrate exclusively on C. Can you recommend me a manual like > this? (I do have some books on C, but there are some functions that are > compiler-specific and are not described in the C books). Thank you again > for your help! > When I began, I too used books! But unfortunately, they were local ones (from India). I would recommend Thinking In C++ by Bruce Eckel if you were doing C++. For a beginner in C, I think the best way to get what you want is to simply dive into the header files in the include directory. ;) -- Rohit V. Bhute http://rvbhute.freelinuxhost.com/wordpress |
|
From: Lucke, J. F <Jos...@ut...> - 2006-05-09 14:12:31
|
Has anyone packaged version 1.8 of the GNU Scientific Library? The version currently available as a DevCpp package is 1.6 =20 Joseph F. Lucke, PhD Biostatistician Center for Clinical Research and Evidence-based Medicine Department of Pediatrics School of Medicine University of Texas Health Science Center at Houston Voice: 713-500-5651 Email: Jos...@ut... Postal Mail: PO Box 20708, Houston, TX 77225-0708 =20 =20 |
|
From: Tudorache D. <str...@ho...> - 2006-05-09 09:21:38
|
Hi, Is there a Dev C++ manual with a COMPLETE description of the C functions in Dev C++. of the libraries, which functions are contained in which header files? Thank you very much in advance! _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |
|
From: Per W. <pw...@ia...> - 2006-05-09 05:34:14
|
My mistake :(
The (int fd) constructor was only available as a non-standard extension
in the old fstream classes.
/Per W
On Mon, 8 May 2006, Erik Schmidt wrote:
> I was told to use fileno and an fstream constructor to convert a
> FILE* to an fstream.
>
> I'm trying to do this on a mac, here's the ode that failed:
>
> #include <iostream>
> #include <cstdio>
> #include <string>
> #include <fstream>
>
> using namespace std;
>
> int main(int argc,char *argv[]){
>
> fstream pipe(fileno(popen("ls","r")));
>
> string total;
> char c;
>
> cout<<"initialized"<<endl;
>
> while((pipe.get(c))!=NULL){
>
> total+=c;
>
> }
>
> cout<<total<<endl;
>
> pipe.close();
>
> return 0;
>
> }
>
> any ideas why this doesn't work
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> 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: Erik S. <esc...@gm...> - 2006-05-08 21:53:18
|
I was told to use fileno and an fstream constructor to convert a
FILE* to an fstream.
I'm trying to do this on a mac, here's the ode that failed:
#include <iostream>
#include <cstdio>
#include <string>
#include <fstream>
using namespace std;
int main(int argc,char *argv[]){
fstream pipe(fileno(popen("ls","r")));
string total;
char c;
cout<<"initialized"<<endl;
while((pipe.get(c))!=NULL){
total+=c;
}
cout<<total<<endl;
pipe.close();
return 0;
}
any ideas why this doesn't work
|
|
From: Martin D. <nex...@qu...> - 2006-05-08 14:01:42
|
Erik Schmidt wrote:
> This code is for a mac
>
> why does this not work?
>
> FILE* pipe=popen("top","top");
You request invalid permissions for the pipe. The code should be
FILE* pipe=popen("top","r");
Then you can read from that pipe.
Happy coding,
next_ghost
|
|
From: Erik S. <esc...@gm...> - 2006-05-06 19:46:42
|
This code is for a mac
why does this not work?
#include <iostream>
#include <cstdio>
#include <fstream>
#include <string>
using namespace std;
int main(int argc,char *argv[]){
FILE* pipe=popen("top","top");
ifstream pipeStream(fileno(pipe));
string total;
char c;
while((pipeStream.get(c))!=NULL){
total+=c;
}
cout<<total<<endl;
pipeStream.close();
return 0;
}
|
|
From: Per W. <pw...@ia...> - 2006-05-06 19:14:42
|
It is not part of any standard library. However, google "popen for windows" gives a number of links to ports of the function". /Per W On Sat, 6 May 2006, Erik Schmidt wrote: > what library is popen in? > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > 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: Erik S. <esc...@gm...> - 2006-05-06 17:00:20
|
what library is popen in? |
|
From: KrowniX \(\)--\(\) <kr...@ya...> - 2006-05-05 13:11:40
|
Sorry people...
I found out why I can´t send e-mails...it´s becouse the configuration of the proxy that doesn´t allowed smtp communication..
Sorry ..but if anyone wants...knock yourself out with my code...it´s working..
Bye
Kronix
"KrowniX ()--()" <kr...@ya...> escreveu: Hi,
I ´m having trouble in send() and recv() smtp commands, I already write my code, and there´s no error, and works without problems but I still don´t send e-mails...
I´m posting my code here, could you take a look a maybe tell me where I´m wrong?
If someone need the .dev file to try help me, let me know that I will send it to you.
Bye,
Krownix
#include <stdio.h>
#include <stdlib.h>
#include <winsock2.h>
#include "base64.h"
int Help()
{
printf("Modo de uso:\n");
printf(" -h Help do programa\n");
printf(" -v Versão do programa\n\n");
printf(" -s IP do servidor SMTP\n");
printf(" -u Usuario do servidor SMTP\n");
printf(" -p Senha do servidor SMTP\n");
printf(" -f Email de quem esta enviando\n");
printf(" -t Email de quem irá receber o email\n");
printf(" -b Assunto do email\n");
printf(" -d Corpo da mensagem\n");
printf(" -r Caminho do arquivo que será enviado como corpo\n\n");
printf("Lembrando que usando -b e/ou -d será necessario usar o simbolo %20 ao invez de espaço\n\n");
printf("Exempo:\n");
printf("emailer -s 209.191.85.254 -u meuuser -p senhateste -f me...@ya... -t meu...@gm... -b Assunto%20do%20meu%20email -r C:\\corpo.txt\n");
return 0;
}
int Version()
{
printf("Versao: 0.1\n");
}
char *strreplace(char *str)
{
char *strf;
int i, j=0;
strf=malloc(strlen(str) * sizeof(char));
for(i=0; i<strlen(str); i++)
{
if(str[i] == '%')
if(str[i+1] == '2')
if(str[i+2] == '0')
{
strf[j]=' ';
i=i+2;
j++;
continue;
}
strf[j]=str[i];
j++;
}
strf[j]='\0';
return strf;
}
int main(int argc, char **argv)
{
/*if(argc>6)
{
Help();
exit(0);
}*/
int i=0, j=0; //Contadores
char *Servidor, *Usuario, *Senha, *From, *To, *Subject, *Body;
for (i=1; i<argc; i++) //Looping que percorre os argumentos
{
switch(argv[i][1]) //Transferencia dos argumentos para as variaveis
{
case 'v': //Version. Mostra a versão do programa
Version();
exit(0);
break;
case 'h': //Help. Chama o Help do programa
Help();
exit(0);
break;
case 's': //Server. Endereço do servidor
i++;
Servidor=malloc(strlen(argv[i]) * sizeof(char));
strcpy(Servidor, argv[i]);
break;
case 'u': //User. Usuario do servidor
i++;
Usuario=malloc(strlen(argv[i]) * sizeof(char));
strcpy(Usuario, argv[i]);
break;
case 'p': //Password. Senha do servidor
i++;
Senha=malloc(strlen(argv[i]) * sizeof(char));
strcpy(Senha, argv[i]);
break;
case 'f': //From. Email de quem ta enviando
i++;
From=malloc(strlen(argv[i]) * sizeof(char));
strcpy(From, argv[i]);
break;
case 't': //To. Email de quem vai receber
i++;
To=malloc(strlen(argv[i]) * sizeof(char));
strcpy(To, argv[i]);
break;
case 'b': //Subject. Assunto do email
i++;
Subject=malloc(strlen(argv[i]) * sizeof(char));
strcpy(Subject, strreplace(argv[i]));
break;
case 'd': //Body. Corpo do email
i++;
Body=malloc(strlen(argv[i]) * sizeof(char));
strcpy(Body, strreplace(argv[i]));
break;
case 'r': //Body. Corpo do email com arquivo
i++;
FILE *arq=fopen(argv[i], "r");
char ch;
if(arq==NULL)
{
printf("O arquivo referente ao corpo da mensagem não existe, ou não pode ser aberto\n");
exit(0);
}
while((ch=fgetc(arq))!=EOF)
j++;
fseek(arq, -1*j*sizeof(char), 1);
Body=malloc(j * sizeof(char));
j=0;
while((ch=fgetc(arq))!=EOF) //put FILE in Body
{
Body[j]=ch;
j++;
}
Body[j]='\0';
break;
}
}
//crypt pass/user
if((Usuario!=NULL) && (Senha!=NULL))
{
char r[30];
int res, outlen;
res=encode64(Usuario, strlen(Usuario), r, strlen(Usuario)*2, &outlen);
free(Usuario);
Usuario=malloc(strlen(r) * sizeof(char));
strcpy(Usuario, r);
res=encode64(Senha, strlen(Senha), r, strlen(Senha)*2, &outlen);
free(Senha);
Senha=malloc(strlen(r) * sizeof(char));
strcpy(Senha, r);
}
WSADATA wsadata;
HOSTENT *HostInfo;
SOCKET Sck;
struct sockaddr_in Remote;
long tmpCon;
int Conexao;
char Buffer[512];
if(WSAStartup(MAKEWORD(2,0), &wsadata)!=0)
{
printf("Winsock não encontrado\n");
exit(0);
}
if(LOBYTE(wsadata.wVersion )!=2||HIBYTE(wsadata.wVersion )!=0)
{
printf("Versão do winsock antiga. Atualize o winsock\n");
exit(0);
}
Sck=socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
Remote.sin_family = AF_INET;
Remote.sin_port = htons(25);
Remote.sin_addr.s_addr = inet_addr(Servidor);
HostInfo = gethostbyname(Servidor);
if (HostInfo == NULL)
{
printf("Impossivel conectar ao servidor.\n");
exit(0);
}
Conexao=connect(Sck,(struct sockaddr *)&Remote, sizeof(Remote));
tmpCon = GetTickCount();
while(Conexao!=0)
if ((GetTickCount()-tmpCon) > 2500) break;
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
memset(Buffer, '\0', sizeof(Buffer));
if(Conexao==0)
{
if(Usuario==NULL)
{
send(Sck, "HELO\r\n", 6, 0);
printf("enviando helo");
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "250")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
exit(0);
}
}
printf("%s\n", Buffer);
}
else
{
/**********************************/
send(Sck, "EHLO ", 5, 0); //sendsEHLO
send(Sck, Servidor, strlen(Servidor), 0); //sends EHLO
send(Sck, "\r\n", 2, 0); //sends EHLO
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "250")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
send(Sck, "AUTH LOGIN\r\n", 12, 0); //sends AUTH LOGIN
printf("\nenviando auth login");
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "334")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
send(Sck, Usuario, strlen(Usuario), 0); //sends the user
send(Sck, "\r\n", 2, 0);
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "334")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
send(Sck, Senha, strlen(Senha), 0); //send the password
send(Sck, "\r\n", 2, 0);
printf("\nenviando senha: %s", Senha);
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "235")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
//exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
}
/**********************************/
send(Sck, "MAIL FROM: ", 11, 0); //who is sending the mail
send(Sck, From, strlen(From), 0);
send(Sck, "\r\n", 2, 0);
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "250")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
send(Sck, "RCPT TO: ", 9, 0); //who will receive the mail
send(Sck, To, strlen(To), 0);
send(Sck, "\r\n", 2, 0);
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "250")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //Fecha a conexao
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
send(Sck, "DATA\r\n", 6, 0); //Diz ao servidor que eu estou pronto pra escrever o email
if((recv(Sck, Buffer, 512, 0))==0) //Verifica a resposta
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "354")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //Fecha a conexao
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
/* thats the header of the mail
*
*/
send(Sck, "From: ", 6, 0);
send(Sck, From, strlen(From), 0);
send(Sck, "\r\n", 2, 0);
send(Sck, "To: ", 4, 0);
send(Sck, To, strlen(To), 0);
send(Sck, "\r\n", 2, 0);
send(Sck, "Subject: ", 9, 0);
send(Sck, Subject, strlen(Subject), 0);
send(Sck, "\r\n", 2, 0);
send(Sck, "MIME-Version: 1.0\r\n", 19, 0);
send(Sck, "Content-Type: multipart/alternative;\r\n", 38, 0);
send(Sck, " boundary=----=_Part_1255_4525121.1146192955226\r\n", 56, 0);
send(Sck, "\r\n", 2, 0);
send(Sck, "------=_Part_1255_4525121.1146192955226\r\n", 41, 0);
send(Sck, "Content-Type: text/plain; charset=ISO-8859-1; format=flowed\r\n", 61, 0);
send(Sck, "Content-Transfer-Encoding: quoted-printable\r\n", 45, 0);
send(Sck, "Content-Disposition: inline\r\n", 29, 0);
send(Sck, "\r\n", 2, 0);
send(Sck, Body, strlen(Body), 0);
send(Sck, "\r\n", 2, 0);
send(Sck, "------=_Part_1255_4525121.1146192955226--\r\n", 43, 0);
send(Sck, ".\r\n", 3, 0);
if((recv(Sck, Buffer, 512, 0))==0) //Verifica a resposta
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "250")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //Fecha a conexao
exit(0);
}
}
printf("%s\n", Buffer);
send(Sck, "quit\r\n", 6, 0); //Fecha a conexao
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
}
return 0;
}
---------------------------------
Yahoo! doce lar. Faça do Yahoo! sua homepage.
---------------------------------
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora! |
|
From: KrowniX \(\)--\(\) <kr...@ya...> - 2006-05-05 12:11:06
|
Hi,
I ´m having trouble in send() and recv() smtp commands, I already write my code, and there´s no error, and works without problems but I still don´t send e-mails...
I´m posting my code here, could you take a look a maybe tell me where I´m wrong?
If someone need the .dev file to try help me, let me know that I will send it to you.
Bye,
Krownix
#include <stdio.h>
#include <stdlib.h>
#include <winsock2.h>
#include "base64.h"
int Help()
{
printf("Modo de uso:\n");
printf(" -h Help do programa\n");
printf(" -v Versão do programa\n\n");
printf(" -s IP do servidor SMTP\n");
printf(" -u Usuario do servidor SMTP\n");
printf(" -p Senha do servidor SMTP\n");
printf(" -f Email de quem esta enviando\n");
printf(" -t Email de quem irá receber o email\n");
printf(" -b Assunto do email\n");
printf(" -d Corpo da mensagem\n");
printf(" -r Caminho do arquivo que será enviado como corpo\n\n");
printf("Lembrando que usando -b e/ou -d será necessario usar o simbolo %20 ao invez de espaço\n\n");
printf("Exempo:\n");
printf("emailer -s 209.191.85.254 -u meuuser -p senhateste -f me...@ya... -t meu...@gm... -b Assunto%20do%20meu%20email -r C:\\corpo.txt\n");
return 0;
}
int Version()
{
printf("Versao: 0.1\n");
}
char *strreplace(char *str)
{
char *strf;
int i, j=0;
strf=malloc(strlen(str) * sizeof(char));
for(i=0; i<strlen(str); i++)
{
if(str[i] == '%')
if(str[i+1] == '2')
if(str[i+2] == '0')
{
strf[j]=' ';
i=i+2;
j++;
continue;
}
strf[j]=str[i];
j++;
}
strf[j]='\0';
return strf;
}
int main(int argc, char **argv)
{
/*if(argc>6)
{
Help();
exit(0);
}*/
int i=0, j=0; //Contadores
char *Servidor, *Usuario, *Senha, *From, *To, *Subject, *Body;
for (i=1; i<argc; i++) //Looping que percorre os argumentos
{
switch(argv[i][1]) //Transferencia dos argumentos para as variaveis
{
case 'v': //Version. Mostra a versão do programa
Version();
exit(0);
break;
case 'h': //Help. Chama o Help do programa
Help();
exit(0);
break;
case 's': //Server. Endereço do servidor
i++;
Servidor=malloc(strlen(argv[i]) * sizeof(char));
strcpy(Servidor, argv[i]);
break;
case 'u': //User. Usuario do servidor
i++;
Usuario=malloc(strlen(argv[i]) * sizeof(char));
strcpy(Usuario, argv[i]);
break;
case 'p': //Password. Senha do servidor
i++;
Senha=malloc(strlen(argv[i]) * sizeof(char));
strcpy(Senha, argv[i]);
break;
case 'f': //From. Email de quem ta enviando
i++;
From=malloc(strlen(argv[i]) * sizeof(char));
strcpy(From, argv[i]);
break;
case 't': //To. Email de quem vai receber
i++;
To=malloc(strlen(argv[i]) * sizeof(char));
strcpy(To, argv[i]);
break;
case 'b': //Subject. Assunto do email
i++;
Subject=malloc(strlen(argv[i]) * sizeof(char));
strcpy(Subject, strreplace(argv[i]));
break;
case 'd': //Body. Corpo do email
i++;
Body=malloc(strlen(argv[i]) * sizeof(char));
strcpy(Body, strreplace(argv[i]));
break;
case 'r': //Body. Corpo do email com arquivo
i++;
FILE *arq=fopen(argv[i], "r");
char ch;
if(arq==NULL)
{
printf("O arquivo referente ao corpo da mensagem não existe, ou não pode ser aberto\n");
exit(0);
}
while((ch=fgetc(arq))!=EOF)
j++;
fseek(arq, -1*j*sizeof(char), 1);
Body=malloc(j * sizeof(char));
j=0;
while((ch=fgetc(arq))!=EOF) //put FILE in Body
{
Body[j]=ch;
j++;
}
Body[j]='\0';
break;
}
}
//crypt pass/user
if((Usuario!=NULL) && (Senha!=NULL))
{
char r[30];
int res, outlen;
res=encode64(Usuario, strlen(Usuario), r, strlen(Usuario)*2, &outlen);
free(Usuario);
Usuario=malloc(strlen(r) * sizeof(char));
strcpy(Usuario, r);
res=encode64(Senha, strlen(Senha), r, strlen(Senha)*2, &outlen);
free(Senha);
Senha=malloc(strlen(r) * sizeof(char));
strcpy(Senha, r);
}
WSADATA wsadata;
HOSTENT *HostInfo;
SOCKET Sck;
struct sockaddr_in Remote;
long tmpCon;
int Conexao;
char Buffer[512];
if(WSAStartup(MAKEWORD(2,0), &wsadata)!=0)
{
printf("Winsock não encontrado\n");
exit(0);
}
if(LOBYTE(wsadata.wVersion )!=2||HIBYTE(wsadata.wVersion )!=0)
{
printf("Versão do winsock antiga. Atualize o winsock\n");
exit(0);
}
Sck=socket(AF_INET, SOCK_STREAM, IPPROTO_IP);
Remote.sin_family = AF_INET;
Remote.sin_port = htons(25);
Remote.sin_addr.s_addr = inet_addr(Servidor);
HostInfo = gethostbyname(Servidor);
if (HostInfo == NULL)
{
printf("Impossivel conectar ao servidor.\n");
exit(0);
}
Conexao=connect(Sck,(struct sockaddr *)&Remote, sizeof(Remote));
tmpCon = GetTickCount();
while(Conexao!=0)
if ((GetTickCount()-tmpCon) > 2500) break;
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
memset(Buffer, '\0', sizeof(Buffer));
if(Conexao==0)
{
if(Usuario==NULL)
{
send(Sck, "HELO\r\n", 6, 0);
printf("enviando helo");
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "250")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
exit(0);
}
}
printf("%s\n", Buffer);
}
else
{
/**********************************/
send(Sck, "EHLO ", 5, 0); //sendsEHLO
send(Sck, Servidor, strlen(Servidor), 0); //sends EHLO
send(Sck, "\r\n", 2, 0); //sends EHLO
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "250")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
send(Sck, "AUTH LOGIN\r\n", 12, 0); //sends AUTH LOGIN
printf("\nenviando auth login");
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "334")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
send(Sck, Usuario, strlen(Usuario), 0); //sends the user
send(Sck, "\r\n", 2, 0);
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "334")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
send(Sck, Senha, strlen(Senha), 0); //send the password
send(Sck, "\r\n", 2, 0);
printf("\nenviando senha: %s", Senha);
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "235")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
//exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
}
/**********************************/
send(Sck, "MAIL FROM: ", 11, 0); //who is sending the mail
send(Sck, From, strlen(From), 0);
send(Sck, "\r\n", 2, 0);
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "250")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //close the connection
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
send(Sck, "RCPT TO: ", 9, 0); //who will receive the mail
send(Sck, To, strlen(To), 0);
send(Sck, "\r\n", 2, 0);
if((recv(Sck, Buffer, 512, 0))==0) //check the recv()
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "250")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //Fecha a conexao
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
send(Sck, "DATA\r\n", 6, 0); //Diz ao servidor que eu estou pronto pra escrever o email
if((recv(Sck, Buffer, 512, 0))==0) //Verifica a resposta
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "354")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //Fecha a conexao
exit(0);
}
}
printf("%s\n", Buffer);
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
/* thats the header of the mail
*
*/
send(Sck, "From: ", 6, 0);
send(Sck, From, strlen(From), 0);
send(Sck, "\r\n", 2, 0);
send(Sck, "To: ", 4, 0);
send(Sck, To, strlen(To), 0);
send(Sck, "\r\n", 2, 0);
send(Sck, "Subject: ", 9, 0);
send(Sck, Subject, strlen(Subject), 0);
send(Sck, "\r\n", 2, 0);
send(Sck, "MIME-Version: 1.0\r\n", 19, 0);
send(Sck, "Content-Type: multipart/alternative;\r\n", 38, 0);
send(Sck, " boundary=----=_Part_1255_4525121.1146192955226\r\n", 56, 0);
send(Sck, "\r\n", 2, 0);
send(Sck, "------=_Part_1255_4525121.1146192955226\r\n", 41, 0);
send(Sck, "Content-Type: text/plain; charset=ISO-8859-1; format=flowed\r\n", 61, 0);
send(Sck, "Content-Transfer-Encoding: quoted-printable\r\n", 45, 0);
send(Sck, "Content-Disposition: inline\r\n", 29, 0);
send(Sck, "\r\n", 2, 0);
send(Sck, Body, strlen(Body), 0);
send(Sck, "\r\n", 2, 0);
send(Sck, "------=_Part_1255_4525121.1146192955226--\r\n", 43, 0);
send(Sck, ".\r\n", 3, 0);
if((recv(Sck, Buffer, 512, 0))==0) //Verifica a resposta
{
printf("A conexao foi desfeita\n");
exit(0);
}
else
{
if(strstr(Buffer, "250")==0)
{
printf("Erro inexperado.\n");
send(Sck, "quit\r\n", 6, 0); //Fecha a conexao
exit(0);
}
}
printf("%s\n", Buffer);
send(Sck, "quit\r\n", 6, 0); //Fecha a conexao
memset(Buffer, '\0', sizeof(Buffer));
/**********************************/
}
return 0;
}
---------------------------------
Yahoo! doce lar. Faça do Yahoo! sua homepage. |
|
From: Per W. <pw...@ia...> - 2006-05-04 20:10:53
|
All external C symbols have a leading underscore, i.e. from assembler, the
function is called _printf.
Are you planning to write device drivers for embedded systems? If not -
exactly why do you bother with learning assembler?
First of all, it is very hard to write more efficient code than a modern
compiler generates.
Then, you have to realize that different compilers uses different syntax
for the assembler code.
Also, different compilers have different calling conventions and layout of
memory objects. For C++, the name mangling differs between compilers and
even between different versions of the same compiler.
Finally, there are quite a number of other processors than the x86 series,
and most code that requires assembler routines are _not_ run on x86
machines.
/Per W
On Thu, 4 May 2006, Noorez Kassam wrote:
> I'm trying to learn how to use the __asm. Hear is something that i was
> trying to learn from:
>
> #include <stdio.h>
>
>
> char format[] asm("format") =3D "%s %s\n";
>
> char hello[] asm("hello") =3D "Hello" ;
>
> char world[] asm("world") =3D "world";
>
>
> int main( void )
>
> {
> __asm
>
> (
>
> "mov eax, offset world;"
> "push eax;"
> "mov eax, offset hello;"
> "push eax;"
> "mov eax, offset format;"
> "push eax;"
> "call printf;"
>
> //clean up the stack so that main can exit cleanly
> //use the unused register ebx to do the cleanup
>
> "pop ebx;"
> "pop ebx;"
> "pop ebx;"
> );
>
> return 0;
> }
>
> The compile error is that it could not find printf. How do make the print=
f
> function visible to the asm code?.
>
> And one more question... I all other tutorials i've seen, when examples o=
f
> inlining assembly are shown, they are shown with braces{} and not (). Whe=
n I
> compile, i need to use () for it to work.
> Is there something i'm missing here...?
>
> _________________________________________________________________
> 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*.
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job ea=
sier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim=
o
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=
=3D121642
> _______________________________________________
> 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. <lor...@ho...> - 2006-05-04 19:59:58
|
I'm trying to learn how to use the __asm. Hear is something that i was
trying to learn from:
#include <stdio.h>
char format[] asm("format") = "%s %s\n";
char hello[] asm("hello") = "Hello" ;
char world[] asm("world") = "world";
int main( void )
{
__asm
(
"mov eax, offset world;"
"push eax;"
"mov eax, offset hello;"
"push eax;"
"mov eax, offset format;"
"push eax;"
"call printf;"
//clean up the stack so that main can exit cleanly
//use the unused register ebx to do the cleanup
"pop ebx;"
"pop ebx;"
"pop ebx;"
);
return 0;
}
The compile error is that it could not find printf. How do make the printf
function visible to the asm code?.
And one more question... I all other tutorials i've seen, when examples of
inlining assembly are shown, they are shown with braces{} and not (). When I
compile, i need to use () for it to work.
Is there something i'm missing here...?
_________________________________________________________________
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...> - 2006-05-04 11:38:38
|
fstream has a constructor taking a file descriptor. You can retrieve the file descriptor from a FILE by use of the fileno(FILE*) function. One reason for interfacing FILE and a C++ stream is if the C++ code makes calls to an existing C library. However, great care has to be taken to vaoid problems with cached data when switching between C and C++ access methods for an open file. /Per W On Thu, 4 May 2006, KrowniX ()--() wrote: > ..????? > What do you mean...with convert a c FILE* to a cpp fstream...? > You want to create files using the FILE*..and then use c++ class to make = operations with this file? > give me an example ...maybe i could help..but do you try to read the fstr= eam library to see how it works? > > Krownix > > Erik Schmidt <esc...@gm...> escreveu: is there a way a to convert= a c FILE* to a cpp fstream? > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job ea= sier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > 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 > > > > --------------------------------- > Abra sua conta no Yahoo! Mail - 1GB de espa=E7o, alertas de e-mail no ce= lular e anti-spam realmente eficaz. |
|
From: KrowniX \(\)--\(\) <kr...@ya...> - 2006-05-04 11:29:01
|
..????? What do you mean...with convert a c FILE* to a cpp fstream...? You want to create files using the FILE*..and then use c++ class to make operations with this file? give me an example ...maybe i could help..but do you try to read the fstream library to see how it works? Krownix Erik Schmidt <esc...@gm...> escreveu: is there a way a to convert a c FILE* to a cpp fstream? ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ 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 --------------------------------- Abra sua conta no Yahoo! Mail - 1GB de espaço, alertas de e-mail no celular e anti-spam realmente eficaz. |
|
From: Erik S. <esc...@gm...> - 2006-05-04 02:37:14
|
how do I determine the pid of a process running in terminal? this is on a mac, in darwin |
|
From: Erik S. <esc...@gm...> - 2006-05-03 23:43:53
|
is there a way a to convert a c FILE* to a cpp fstream? |
|
From: PARAMVIR D. <too...@ya...> - 2006-05-02 01:55:16
|
How can I use ming (C library to create flash movies) with Dev C++. --------------------------------- Get amazing travel prices for air and hotel in one click on Yahoo! FareChase |
|
From: edmore m. <edm...@ya...> - 2006-04-30 08:38:25
|
i am writing a program where i want one of my tasks is to call values from an n sized array in batches of 100 values to be used as single values in another array.
1. how do i call the values until i reach the end of the array when i do not know the size of the array.
2. how do i get only the values in the first dimension of the array, that is i tobe put into surface 1 with values for the 2nd dimension being left out, where surface1 is given by the summation of the first valuees of array tempa, that is values from i, surface is given by values of the summation of the power of values incremented by j
surface1 = surface1 + pow(tempa[i][j], 2);//surface1 summation
surface = surface + pow(tempa[i][j], 2);//surface2 summation
denominator = surface1*surface;
enumerator = enumerator + (tempa[i][j]*tempa[i][j]);//summation of surface1 *surface2 |
|
From: Per W. <pw...@ia...> - 2006-04-28 06:16:36
|
Dev-C++ uses the MinGW compiler suite, so try www.mingw.org. /Per W On Fri, 28 Apr 2006, Tan, Clarencio wrote: > Hi, > > I would appreciate me if anyone could point me as to where I could > download a copy of the Cygnus Insight Visual Debugger to use with my > Dev-C++ program. I really need to use a debugger for me to easily > understand programs that I deal with. An instruc |