dev-cpp-users Mailing List for Dev-C++ (Page 182)
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: Abhijeet S <abh...@ms...> - 2004-09-15 14:09:28
|
Compiler: Default compiler Executing gcc.exe... gcc.exe "F:\Downloaded\echoserv\echoserv.c" -o "F:\Downloaded\echoserv\echoserv.exe" -ansi -traditional-cpp -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" C:\Dev-Cpp\Bin\..\lib\gcc-lib\mingw32\3.2\tradcpp0.exe: invalid option `-std=c89' Execution terminated Could someone tell me what kind of an error is this ? _________________________________________________________________ Win a trip to Singapore! Experience the magic! http://eu.xmts.net/80450 Click here for details! |
|
From: Michal M. <mi...@mo...> - 2004-09-15 10:32:20
|
Nolan Clayton wrote: > 1.Is there a place where devc++ users post their templates? If so, where? > I have a couple of wxwidgets templates that could be useful. You can pack them into the templates-only devpak and put it on devpaks.org. > 2.Sorry for asking this one. I know devc++ is gpl'ed but does the use > of devc++ require you to open your source code? Or does it depend on > the libraries and or compiler you use? And are there any free compilers > that allow you sell your apps without opening the source. Have you tried to read the GPL licence? http://www.gnu.org/licenses/gpl.html It clearly states: "Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does." So, unless you create modified version of Dev-C++, your program is not restricted to use GPL. It of course depends on everything you use to create your program, the MinGW licence is described here: http://mingw.org/mingwfaq.shtml#faq-license -- Regards, Michal |
|
From: Eric <eri...@cl...> - 2004-09-15 09:54:27
|
I must finish it and let you know ----- Original Message ----- =46rom: "Noorez Kassam" <dar...@ho...> To: <dev...@li...> Sent: Monday, September 13, 2004 4:21 AM Subject: [Dev-C++] passwords I asked a while ago about hiding passwords and someone suggested usin= g standard charater in by cin and then backspace on the character to hi= de it but that seems awakward becuase then u would have to use the enter ke= y for each character and that would bring it down to the next line. Is ther= e a way to use in so that u don't need the enter key? _________________________________________________________________ Take advantage of powerful junk e-mail filters built on patented Microsoft=AE SmartScreen Technology. http://join.msn.com/?pgmarket=3Den-ca&page=3Dbyoa/prem&xAPID=3D1994&D= I=3D1034&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: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement = on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php _______________________________________________ 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 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.762 / Virus Database: 510 - Release Date: 13-Sep-04 |
|
From: Per W. <pw...@ia...> - 2004-09-15 08:26:52
|
You should ave posted the source of the broken function with a stub program that displays the error. /Per W On Tue, 14 Sep 2004, Siva Chandra wrote: > > Hello all, > > I have a strange problem with printf statements. I do > a lot of coding for image-processing functions in C++. > Though C++, I prefer using the cstdio for console I/O. > As indicators for de-bugging, I put in a lot of > printf statements everywhere in my code. Now, my > problem is this: The result of my function depends on > inclusion of a printf statement!! If I comment out > that statement, the output of my function is different > as compared to the one which is got by not commenting > out that statement!!!! > > Has anyone had such a problem before and figured out > what could be the reason for such a problem? > > TIA, > Siva Chandra > > > > > > __________________________________ > Do you Yahoo!? > New and Improved Yahoo! Mail - 100MB free storage! > http://promotions.yahoo.com/new_mail > > > ------------------------------------------------------- > This SF.Net email is sponsored by: thawte's Crypto Challenge Vl > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > Camcorder. More prizes in the weekly Lunch Hour Challenge. > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > _______________________________________________ > 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: Per W. <pw...@ia...> - 2004-09-15 08:24:47
|
Dev-C++ uses the MinGW compiler - a windows port of the Gnu compiler. gcc allows development of comercial applications. So does the gcc base libraries. However, you should keep an eye on all extra libraries you use... /Per W On Tue, 14 Sep 2004, Nolan Clayton wrote: > 1.Is there a place where devc++ users post their templates? If so, where? > I have a couple of wxwidgets templates that could be useful. > > 2.Sorry for asking this one. I know devc++ is gpl'ed but does the use of > devc++ require you to open your source code? Or does it depend on the > libraries and or compiler you use? And are there any free compilers that > allow you sell your apps without opening the source. > > Thanks, > Nolan Clayton > > > ------------------------------------------------------- > This SF.Net email is sponsored by: thawte's Crypto Challenge Vl > Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam > Camcorder. More prizes in the weekly Lunch Hour Challenge. > Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m > _______________________________________________ > 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: Siva C. <siv...@ya...> - 2004-09-15 05:42:37
|
Hello all, I have a strange problem with printf statements. I do a lot of coding for image-processing functions in C++. Though C++, I prefer using the cstdio for console I/O. As indicators for de-bugging, I put in a lot of printf statements everywhere in my code. Now, my problem is this: The result of my function depends on inclusion of a printf statement!! If I comment out that statement, the output of my function is different as compared to the one which is got by not commenting out that statement!!!! Has anyone had such a problem before and figured out what could be the reason for such a problem? TIA, Siva Chandra __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail |
|
From: Nolan C. <ncl...@cs...> - 2004-09-15 04:56:03
|
1.Is there a place where devc++ users post their templates? If so, where?
I have a couple of wxwidgets templates that could be useful.
2.Sorry for asking this one. I know devc++ is gpl'ed but does the use of
devc++ require you to open your source code? Or does it depend on the
libraries and or compiler you use? And are there any free compilers that
allow you sell your apps without opening the source.
Thanks,
Nolan Clayton
|
|
From: Daniel K. O. <dan...@ya...> - 2004-09-14 19:52:36
|
kractor wrote: > i would prefer to write my own Makefiles, not that i distrust how > dev-c++ would do it ... i'd just like to know how to do that myself > ... :P Go to project options -> Makefile -> "Use custom Makefile". > i was reading online that there's several options inside dev-c++ that > you can use to get the compiled filesize down (such as stripping debug > symbols, etc) and i was wondering if anyone might point me to a > document of some sort that might explain the various switches etc I > could use in a custom Makefile to handle this. I supose you also know that both Cygwin and MinGW (which is used by Dev-C++) are GCC ports; so you can use the GCC switches. Look at: http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/Option-Summary.html#Option%20Summary And whenever you need help with GCC, search on google for: site:gcc.gnu.org onlinedocs "your search string here" Daniel K. O. |
|
From: kractor <bar...@co...> - 2004-09-14 14:28:30
|
just started with c++ a bit ago on win32. initially, i was using the cygwin stuffs to do my coding, but a friend suggested i try out dev-c++ as it might better suit my needs. so far, the ide has been great ... but i've got one question as relates to Makefiles. i would prefer to write my own Makefiles, not that i distrust how dev-c++ would do it ... i'd just like to know how to do that myself ... :P i was reading online that there's several options inside dev-c++ that you can use to get the compiled filesize down (such as stripping debug symbols, etc) and i was wondering if anyone might point me to a document of some sort that might explain the various switches etc I could use in a custom Makefile to handle this. |
|
From: <or...@vp...> - 2004-09-13 21:26:18
|
Peter Boehm wrote: >> pCreateNumber create =3D (pCreateNumber)GetProcAddress( hMod,=20 >> "CreateInstance_Number" ); >> >> Number *num =3D create(); >=20 >=20 > Do you get a non-NULL pointer for "create" (create !=3D 0)? That's what I suspected, that he gets a NULL pointer for create, but that= 's because the=20 library isn't loaded. -- Greetings, Bal=E1zs |
|
From: Esteban L. <lor...@ya...> - 2004-09-13 21:05:50
|
Espero poder ser parte de esta lista tan interesante |
|
From: ????????? ???? <de...@in...> - 2004-09-13 17:50:35
|
Hi all, I have some headers in 'C:\MyDir\include' and I want to scan them for source code auto competition. How can I do that? ------------------------------------------------------------------- Regards, Stanislav Yudin Linux-Online, LLC |
|
From: <or...@vp...> - 2004-09-13 10:27:50
|
Dmitry Sidorov wrote:
> ....
> Both DLL and main program are compiled and linked without errors
> But when I`m trying to run a program, it is crushing in a line
> Number *num =3D create();
>=20
> What do I wrong?
Make sure your program is compiled as a console executable (without -mwin=
dows) otherwise=20
you won't see what you print out.
Also, add the line
exit(1);
here
if( !hMod ) {
cout << "Failed to Load the dll: " << GetLastError() << endl;
exit (1);
}
to make sure you exit if the DLL cannot be loaded.
BTW, the program runs fine for me, and prints the right value. I guess yo=
ur DLL isn't=20
loaded for some reason. (You load "mydll.dll", are you sure it's the name=
of your DLL too?)
--
Greetings,
Bal=E1zs
|
|
From: Peter B. <pb...@hg...> - 2004-09-13 10:22:26
|
> pCreateNumber create = (pCreateNumber)GetProcAddress( hMod, "CreateInstance_Number" ); > > Number *num = create(); Do you get a non-NULL pointer for "create" (create != 0)? peter |
|
From: Dmitry S. <si...@si...> - 2004-09-13 04:35:13
|
Hello, dev-cpp-users.
I must import some class from my dll into main program using explicit
linking. DLL sources consists of 2 files
// ========= number.h ===============
#ifndef _NUMBER_H_
#define _NUMBER_H_
#if BUILDING_DLL
# define DLLIMPORT __declspec (dllexport)
#else /* Not BUILDING_DLL */
# define DLLIMPORT __declspec (dllimport)
#endif /* Not BUILDING_DLL */
class DLLIMPORT Number
{
public:
Number();
virtual ~Number();
virtual int Get();
virtual void Set( const int );
private:
int number;
};
extern "C" DLLIMPORT Number* CreateInstance_Number();
#endif // _NUMBER_H_
and
// ========= dllmain.cpp ===============
#include "number.h"
#include <windows.h>
Number::Number():
number( 7 )
{
}
Number::~Number ()
{
}
int Number::Get()
{
return number;
}
void Number::Set( const int n )
{
number = n;
}
Number* CreateInstance_Number()
{
return new Number();
}
int WINAPI DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved )
{
switch (reason){
case DLL_PROCESS_ATTACH:
case DLL_PROCESS_DETACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}
Main program consists of the only main.cpp
// ========= dllmain.cpp ===============
#include <iostream>
#include <stdlib.h>
#include "number.h"
using namespace std;
int main(int argc, char *argv[])
{
HMODULE hMod;
typedef Number* (*pCreateNumber)();
hMod = LoadLibrary("mydll.dll");
if( !hMod )
cerr << "Failed to Load the dll: " << GetLastError() << endl;
pCreateNumber create = (pCreateNumber)GetProcAddress( hMod, "CreateInstance_Number" );
Number *num = create();
num->Set(172);
cout << "Value = " << num->Get() << endl;
system("PAUSE");
return 0;
}
Both DLL and main program are compiled and linked without errors
But when I`m trying to run a program, it is crushing in a line
Number *num = create();
What do I wrong?
--
kind regards
Dmitry
|
|
From: <or...@vp...> - 2004-09-12 23:45:25
|
Scott Simontis wrote: > I downloaded the SDL DevPak and have been attempting to use it. I have=20 > had no luck yet. Whenever I compile, even when using the Dev-C++ SDL=20 > template, I get a linker error. Everything compiles correctly, but I ge= t=20 > the following errors: > [Linker error] undefined reference to `SDL_main' > C:\Code\Makefile.win [Build Error] exe: *** [sdltest.exe] Error 1 On windows, your main() function is redefined to SDL_main() by the SDL_ma= in.h header, and=20 the function will be called from within SDL. However, somehow you need to= tell the SDL=20 headers that you're under windows, otherwise your main() will not be rede= fined to=20 SDL_main(), hence you'll get a linker error, because the library itself w= ants to call=20 SDL_main(), but it is not present. Add -DWIN32 or -D_WIN32 to your project options, and the problem should g= o away. Note, that I only suspected the above by peeking at the headers, I haven'= t tested it. -- Greetings, Bal=E1zs |
|
From: Michal M. <mi...@mo...> - 2004-09-12 17:02:37
|
Noorez Kassam wrote: > I asked a while ago about hiding passwords and someone suggested using > standard charater in by cin and then backspace on the character to hide > it but that seems awakward becuase then u would have to use the enter > key for each character and that would bring it down to the next line. Is > there a way to use in so that u don't need the enter key? IMHO no. But you can implement it using getch() from conio.h. You can also use getpass() from the CONIO 2.0 library: http://conio.sourceforge.net/ Regards, Michal |
|
From: Noorez K. <dar...@ho...> - 2004-09-12 16:26:22
|
I asked a while ago about hiding passwords and someone suggested using standard charater in by cin and then backspace on the character to hide it but that seems awakward becuase then u would have to use the enter key for each character and that would bring it down to the next line. Is there a way to use in so that u don't need the enter key? _________________________________________________________________ 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: Dmitry S. <si...@si...> - 2004-09-12 12:09:39
|
Hello, dev-cpp-users. Does anybody know how could I create COM classes in DevC++? -- kind regards Dmitry |
|
From: Per W. <pw...@ia...> - 2004-09-12 11:38:35
|
You don't need a .def file. It is for manual export of symbols. Just declare exported variables and functions with: __dllspec(dllexport) /Per W On Sun, 12 Sep 2004, Dmitry Sidorov wrote: > Hello, dev-cpp-users. > > Does anybody know how to make DLL in DevC++? > Internal tool generates a .def file with empty EXPORTS section > > -- > kind regards > Dmitry > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > 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: Dmitry S. <si...@si...> - 2004-09-12 11:24:43
|
Hello, dev-cpp-users. Does anybody know how to make DLL in DevC++? Internal tool generates a .def file with empty EXPORTS section -- kind regards Dmitry |
|
From: A. K. <kli...@ad...> - 2004-09-11 21:10:29
|
Claudio Martn Veas wrote: > I was looking for information about how to use the > parallel port with C and I only got these files but I > can not make them work correctly. Ive got more > experience in java than in C so if could tell what do > I have to change to make this program work Ill > apreciate it. > Thanks on advance > Claudio Veas You need giveio.sys to access ports directly, no other way. There is no Windows API to access it Alex |
|
From: Per W. <pw...@ia...> - 2004-09-11 17:55:15
|
Modify rule 2 below to be system("PAUSE");
About the random generation. It is very, very wrong.
1) You say you need 6 random numbers, but you run your generation loop 49
times (1..49).
2) You never assign an random number anywyere...
Your loop contains:
temp = nums[i]; nums[i] = nums[r] = temp;
In the first assignment, nums[i] hasn't been initialized yet, so temp will
be set to an unknown value (which isn't the same as setting it to a random
value).
In the second assignment, you take temp (which has an undefined value) and
assign to the i:th and the r:th element...
I would assume that you were planning on filling the array with the values
1..49, and then perform 49 permutations to get the values 1..49 in random
order, to make sure that the 6 values you print doesn't contain any
repetition.
for (i = 1; i < 50; i++)
nums[i] = i;
for (i = 1; i < 50; i++) {
r = (rand() % 49) + 1;
temp = nums[i];
nums[i] = nums[r];
nums[r] = temp;
}
One other thing. I think it is better to always use all elements of an
array, i.e. use index 0..48 instead of creating the array one element
larger and skip nums[0].
/Per W
On Sat, 11 Sep 2004, Scott Simontis wrote:
> Three solutions:
> 1. Run your program from a console prompt
> 2. Include cstdlib and add the line system("APUSE); before return 0
> 3. Create a useless variable and add a cin statement for it before the
> return 0
>
> --Scott Simontis--
>
>
>
> Meyer von Landenhausen wrote:
>
> > hi please take a look at the source:
> >
> > #include <ctime>
> > #include <iostream>
> > using namespace std;
> >
> > int main()
> > {
> > char buffer[3];
> > int i,r,temp;
> > int nums[50];
> >
> >
> > for(i = 1; i < 50; i++)
> > {
> > r = (rand() % 49) + 1;
> > temp = nums[i]; nums[i] = nums[r] = temp;
> > }
> >
> >
> > cout << "Your six lucky numbers are...\n";
> > cout << itoa(nums[1], buffer, 10) << " ";
> > cout << itoa(nums[2], buffer, 10) << " ";
> > cout << itoa(nums[3], buffer, 10) << " ";
> > cout << itoa(nums[4], buffer, 10) << " ";
> > cout << itoa(nums[5], buffer, 10) << " ";
> > cout << itoa(nums[6], buffer, 10) << " ";
> > cout << endl;
> > return 0;
> > }
> >
> >
> > i cant run without that win2k pro automaticly closes the apllication
> > after i ran it - what kind of code should i inserted therefore i take
> > a look first at the code before it closes it!?
> >
> > btw the prog shall creat 6 different 2-digit long numbers.
> >
> > thx a lot guys
> >
> > _________________________________________________________________
> > It's fast, it's easy and it's free. Get MSN Messenger today!
> > http://www.msn.co.uk/messenger
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> > Project Admins to receive an Apple iPod Mini FREE for your judgement on
> > who ports your project to Linux PPC the best. Sponsored by IBM.
> > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
> > _______________________________________________
> > 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
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|
|
From: Scott S. <age...@co...> - 2004-09-11 16:03:02
|
Three solutions:
1. Run your program from a console prompt
2. Include cstdlib and add the line system("APUSE); before return 0
3. Create a useless variable and add a cin statement for it before the
return 0
--Scott Simontis--
Meyer von Landenhausen wrote:
> hi please take a look at the source:
>
> #include <ctime>
> #include <iostream>
> using namespace std;
>
> int main()
> {
> char buffer[3];
> int i,r,temp;
> int nums[50];
>
>
> for(i = 1; i < 50; i++)
> {
> r = (rand() % 49) + 1;
> temp = nums[i]; nums[i] = nums[r] = temp;
> }
>
>
> cout << "Your six lucky numbers are...\n";
> cout << itoa(nums[1], buffer, 10) << " ";
> cout << itoa(nums[2], buffer, 10) << " ";
> cout << itoa(nums[3], buffer, 10) << " ";
> cout << itoa(nums[4], buffer, 10) << " ";
> cout << itoa(nums[5], buffer, 10) << " ";
> cout << itoa(nums[6], buffer, 10) << " ";
> cout << endl;
> return 0;
> }
>
>
> i cant run without that win2k pro automaticly closes the apllication
> after i ran it - what kind of code should i inserted therefore i take
> a look first at the code before it closes it!?
>
> btw the prog shall creat 6 different 2-digit long numbers.
>
> thx a lot guys
>
> _________________________________________________________________
> It's fast, it's easy and it's free. Get MSN Messenger today!
> http://www.msn.co.uk/messenger
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
> Project Admins to receive an Apple iPod Mini FREE for your judgement on
> who ports your project to Linux PPC the best. Sponsored by IBM.
> Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
> _______________________________________________
> 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: Meyer v. L. <von...@ho...> - 2004-09-11 15:02:04
|
hi please take a look at the source:
#include <ctime>
#include <iostream>
using namespace std;
int main()
{
char buffer[3];
int i,r,temp;
int nums[50];
for(i = 1; i < 50; i++)
{
r = (rand() % 49) + 1;
temp = nums[i]; nums[i] = nums[r] = temp;
}
cout << "Your six lucky numbers are...\n";
cout << itoa(nums[1], buffer, 10) << " ";
cout << itoa(nums[2], buffer, 10) << " ";
cout << itoa(nums[3], buffer, 10) << " ";
cout << itoa(nums[4], buffer, 10) << " ";
cout << itoa(nums[5], buffer, 10) << " ";
cout << itoa(nums[6], buffer, 10) << " ";
cout << endl;
return 0;
}
i cant run without that win2k pro automaticly closes the apllication after i
ran it - what kind of code should i inserted therefore i take a look first
at the code before it closes it!?
btw the prog shall creat 6 different 2-digit long numbers.
thx a lot guys
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
|