dev-cpp-users Mailing List for Dev-C++ (Page 312)
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: <co...@ps...> - 2003-09-30 09:31:22
|
Hi, ALL!
Strange problem with DEV-CPP 4.9.8.3.
I use precompiler directive #warning to comment
important points in code.
Dev-Cpp 4.9.8.3 makes bad makefile when #warning in used.
Test source code:
------------------------------------------
int main(int argc, char *argv[])
{
#warning "MyComment"
return 0;
}
-------------------------------------------
built makefile
-------------------------------------------
# Project: Warn2Mak
# Makefile created by Dev-C++ 4.9.8.3
CPP = g++.exe
CC = gcc.exe
WINDRES = windres.exe
RES =
OBJ = main.o $(RES)
LINKOBJ = main.o $(RES)
LIBS = -L"D:/LANG/MinGW3001/lib"
INCS = -I"D:/LANG/MinGW3001/include"
CXXINCS = -I"D:/LANG/MinGW3001/include/c++" -I"D:/LANG/MinGW3001/include"
BIN = Warn2Mak.exe
CXXFLAGS = $(CXXINCS)
CFLAGS = $(INCS)
.PHONY: all all-before all-after clean clean-custom
all: all-before Warn2Mak.exe all-after
clean: clean-custom
rm -f $(OBJ) $(BIN)
$(BIN): $(LINKOBJ)
$(CC) $(LINKOBJ) -o "Warn2Mak.exe" $(LIBS)
main.o: main.c main.c:3:2: warning: #warning "MyComment"
$(CC) -c main.c -o main.o $(CFLAGS)
--------------------------------------------
I attach test project.
Any suggestions?
Thanks in advance
Collins
|
|
From: Per W. <pw...@ia...> - 2003-09-30 09:25:39
|
First:
sizeof(mybits) is just size of pointer - not size of the array in bytes or
bits.
mybits[bit/8] |=3D 1 << (bit&3);
isn't so complicated. Each character contains 8 bits. So by dividing bit
with 8, I get which character the bit is stored in.
bit&3 will use the 3 least significant bits for a numeric range of 0-7.
1 << (bit&3) will then access one of the 8 bits in the character.
char test_bit(const char* mybits,unsigned bit) {
return (mybits[bit/8] | (1 << (bit&3))) !=3D 0;
}
char clear_bit(const char *mybits,unsigned bit) {
mybits[bit/8] &=3D ~(1 << (bit&3));
}
/Per W
On Tue, 30 Sep 2003, Christian Sch=E4fer wrote:
> hi Per,
>
> I'll show you my code now. somehow it does not work as planned..
>
> char *alloc_bits(unsigned int);
> void set_bit(char*, unsigned int);
>
> int main(int argc, char *argv[])
> {
> char *mybits;
>
> mybits =3D alloc_bits(60);
>
> if (mybits) printf("bits[%d]: %X\n",sizeof(mybits), *mybits);
>
> if (mybits) set_bit(mybits,2);
>
> if (mybits) printf("bits[%d]: %X\n",sizeof(mybits), *mybits);
>
> system("PAUSE");
> return 0;
> }
>
> char *alloc_bits(unsigned int bits)
> {
> return calloc(((bits+7)/8), sizeof(char));
> }
>
> void set_bit(char* bits,unsigned int bit)
> {
> bits[bit/8] |=3D 1 << (bit&3);
> }
>
> what exactly does the set_bit() function do?
> I don't understand it fully especially the (bit&3) part.
> also I am totally lost in writing a get_bit() function..
>
> any help appreciated!
>
>
> gruss
> /Christian mailto:ca...@kr...
>
> ---
>
>
> I propose that the following character sequence for joke markers:
>
> :-)
>
> 19-Sep-82 11:44 Scott E Fahlman
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> 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: DarkSaidin <ma...@da...> - 2003-09-30 08:54:33
|
Hello ! thanks for the update, Collin. The URL is not available for me though. Maybe I should check back later. Colin Laplace wrote: > Hello ! > > I've just released version 4.9.8.3. Please update to this version since it > contains the new working WebUpdate module. This is probably the last update > until 4.9.9.0 release. > > Here is the change log: > * On Dev-C++ first time configuration dialog, a code completion cache of all > the standard include files can now be generated > * Improved WebUpdate module > * Many bug fixes > > You can download it from: > http://bloodshed.net/dev/devcpp.html > or "Check for updates" in Dev-C++ :) > > Greetings, > Colin Laplace > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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: <ca...@kr...> - 2003-09-30 08:24:38
|
hi Per,
I'll show you my code now. somehow it does not work as planned..
char *alloc_bits(unsigned int);
void set_bit(char*, unsigned int);
int main(int argc, char *argv[])
{
char *mybits;
mybits = alloc_bits(60);
if (mybits) printf("bits[%d]: %X\n",sizeof(mybits), *mybits);
if (mybits) set_bit(mybits,2);
if (mybits) printf("bits[%d]: %X\n",sizeof(mybits), *mybits);
system("PAUSE");
return 0;
}
char *alloc_bits(unsigned int bits)
{
return calloc(((bits+7)/8), sizeof(char));
}
void set_bit(char* bits,unsigned int bit)
{
bits[bit/8] |= 1 << (bit&3);
}
what exactly does the set_bit() function do?
I don't understand it fully especially the (bit&3) part.
also I am totally lost in writing a get_bit() function..
any help appreciated!
gruss
/Christian mailto:ca...@kr...
---
I propose that the following character sequence for joke markers:
:-)
19-Sep-82 11:44 Scott E Fahlman
|
|
From: Neszt T. <ne...@ss...> - 2003-09-30 08:16:57
|
Hello! Thank You for Your answer. That makes me clear many things. > The header has all the function and variable declarations the program > needs, but the actual code is in the dll. That's just a dinamic link > library: a file outside the exe that has the code which has to be > executed, having the files for the exe included the header so they know > there are those variables and functions somewhere - in the external dll. Ok, I see. > If you want have that code inside the exe, then you need use a static > library, (those named libxxx.a). In your case your libxxx.a is what is > known as import library, which includes the symbols of the dinamic > library which have to be exported from the dll, but the code is still in > the dll. So is that mean, that the static library and the import library is same regarding the names? How can I find out, if my libaaa.a is static or import library? (from the size?) > The only solution is finding a static version of the dll. If it had been > built by you, simply make the project an static link library instead a > dinamic one (I mean, the project you used to build the dll). If it is a No, it is not bulit by me. > dll from some library you bought, then you'll have to check the > documentation for if there is a static version or, if you got the source > and built it, checking the makefiles for if there is some option so it > builds as a static library. It is not secret, the libraries is the glut and the fmod. As far as I know, these are free and also the source code is available. Now, I tried to compile both of them with dev-c++ without result. (Even nor dynamic nor static library couldn't be create) Regards, Neszt Tibor |
|
From: Edric T. <pp...@ho...> - 2003-09-30 07:04:37
|
Hi guys,
I've ran into a small problem here...
What I'm trying to do is to iterate through an STL data structure. On a =
successful match in criteria, I wish to delete the iterator and its =
contents away from the memory. However, when I attempted to call delete =
on the node that I want to remove, the compilation throws an error. =
Anyone knows what's going on? Here's the code for your reference:
for (ResultTable::iterator xIter=3DresultTable.begin(); =
xIter!=3DresultTable.end(); ) {
if (!matchFound) {
// Match was unsuccessfull
// TODO:
// Free memory allocated to this node
delete(*xIter); // Compilation fails at this point
resultTable.erase(xIter++);
}
else {
// Match was successful begin copying the additional =
columns=20
// over from y
++xIter;
}
}
Thanks and regards,
Ed |
|
From: Chris S. <CS...@Ai...> - 2003-09-30 03:57:39
|
William,=20 The .dev file can be opened and edited with a text editor. It will = contain the reference to the old read_level.c file.=20 BUT the SAFEST way to deal with this problem is to:=20 1) in Windows explorer copy the file draw_level.c to a file called = read_level.c 2) open the project in DevC++ - it should now open OK because it will = see read_level.c 3) remove read_level.c from the project=20 4) add the file draw_level.c to the project=20 5) confirm all is OK and close the project=20 6) from Windows explorer delete the read_level.c file you created in 1) = above. You won't need it now.=20 This should fix it.=20 The reasons why using a text editor to change the reference to = read_level.c in the .dev file is not recommended is that a) any mistake = will cause DevC++ to reject the .dev file, and b) DevC++ writes a time = stamp to each file in the .dev file to tell if the files have been = changed since DevC++ last had them open - I don't know how to ensure = this time stamp is correctly set.=20 Hope this helps.=20 Chris=20 -----Original Message----- From: William Labbett [mailto:wil...@uk...] Sent: Tuesday, 30 September 2003 12:36 PM To: dev...@li... Subject: [Dev-C++] hello and .dev files Hello! first question to the list; i'm wondering; i re-named one of my .c files in a project to draw_level.c from = read_level.c but when i open the project i get cannot find read_level.c . Obviously Dev-C's looking for read_level.c not draw_level.c is there a way to access the .dev file to change what files it looks 4? (assuming this is when the info on what files the project's made of is kept). thanks for any help, william ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ 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: William L. <wil...@uk...> - 2003-09-30 02:28:15
|
Hello! first question to the list; i'm wondering; i re-named one of my .c files in a project to draw_level.c from read_level.c but when i open the project i get cannot find read_level.c . Obviously Dev-C's looking for read_level.c not draw_level.c is there a way to access the .dev file to change what files it looks 4? (assuming this is when the info on what files the project's made of is kept). thanks for any help, william |
|
From: Brian N. <tri...@on...> - 2003-09-29 22:56:41
|
Where is the resource editor? The help file says it's supposed to be under the Project menu but I can't find it anywhere. I have v 4.9.8.3, so maybe it's not available yet on this version..? -- www.againsttcpa.com |
|
From: Yeoh H. <ye...@ye...> - 2003-09-29 21:54:16
|
Hi, If you need to do data file compression in your C program, you might want to consider ZLib. zlib 1.1.4 is a general purpose data compression library. Included in this zip package is: 1. zlib SDK 2. Dev-C++ projects and source codes of sample C programs: minizip, miniunz and minigzip. Please see the ReadMe file in the package for details on the authors of the sample programs. These sample programs were compiled using Dev-C++ 4.9.8.0 (GCC 3.2) The download URL is: http://www.yeohhs.com/shareware/zlibcDevCpp.zip File Size: 64.2 KB Best Regards, Yeoh -- |
|
From: Reid T. <Rei...@at...> - 2003-09-29 20:14:10
|
as info - I was running the program via the "compile and run" button on=20 the gui, rather than via a command line. reid > -----Original Message----- > From: Per Westermark [mailto:pw...@ia...]=20 > Sent: Monday, September 29, 2003 2:42 PM > To: vasanthsena x > Cc: Reid Thompson; dev...@li... > Subject: RE: [Dev-C++] Newbie Question. >=20 >=20 > It is a bit easier to count number of characters in the file=20 > if you move your nl++ inside the braces. >=20 > EOF works just as in all other C libraries. EOF is defined as=20 > -1 and that is the return value of getchar() after last=20 > character has been read. >=20 > For windows: > type myfile | my_eof_program >=20 > For Unix: > cat myfile | ./my_eof_program >=20 > should work. At least my terminals stays open if I run the=20 > program directly and enters text and end it with Ctrl-D.=20 > However, if I press Ctrl-D a second time, i.e. when I'm on=20 > the command line, I will loose my window. >=20 > /Per W >=20 > On Mon, 29 Sep 2003, vasanthsena x wrote: >=20 > > Hi Reid, > > > > EOF =3D=3D Ctrl-d. > > > > when I do that my window closes..Also why should I > > include <stdlib.h>? > > > > I ran your program too.It doesnt work either... > > > > Thanks, > > > > S. > > --- Reid Thompson <Rei...@at...> wrote: > > > #include <stdio.h> > > > #include <stdlib.h> > > > > > > main() > > > { > > > int c,nl=3D0; > > > > > > while (( c=3D getchar()) !=3D EOF) > > > { > > > } > > > ++nl; > > > printf("%d\n",nl); > > > system("PAUSE"); > > > return 0; > > > > > > > > > } > > > > > > else you will get number of characters entered > > > rather than number of > > > lines > > > > > > reid > > > > > > > > > > -----Original Message----- > > > > From: vasanthsena x [mailto:vas...@ya...] > > > > > > > Sent: Monday, September 29, 2003 12:40 PM > > > > To: dev...@li... > > > > Subject: [Dev-C++] Newbie Question. > > > > > > > > > > > > Can Someone tell me how getchar() and EOF work on > > > Dev > > > > C++. I have written the following program to count > > > # > > > > of lines. > > > > > > > > #include <stdio.h> > > > > main() > > > > { > > > > int c,nl=3D0; > > > > > > > > while (( c=3D getchar()) !=3D EOF) > > > > ++nl; > > > > printf("%d\n",nl); > > > > system("PAUSE"); > > > > return 0; > > > > > > > > > > > > } > > > > > > > > > > > > now before I get any output the screen > > > disappears.As > > > > you can see I have included system("PAUSE"); > > > > > > > > > > > > > > > > __________________________________ > > > > Do you Yahoo!? > > > > The New Yahoo! Shopping - with improved product > > > search > > > > http://shopping.yahoo.com > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This sf.net email is sponsored by:ThinkGeek > > > > Welcome to geek heaven. > > > > http://thinkgeek.com/sf=20 > > > > _______________________________________________ > > > > 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 > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product search=20 > > http://shopping.yahoo.com > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf=20 > > _______________________________________________ > > 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 > > >=20 >=20 |
|
From: <ca...@kr...> - 2003-09-29 19:57:07
|
hi Per,
I made some changes to your proposed code.
> bits = malloc(size);
> if (bits) memset(bits,0,size);
now is:
bits = calloc(size, sizeof(char));
this should do the trick.
just thought I'd post it.
gruss
/Christian mailto:ca...@kr...
---
I propose that the following character sequence for joke markers:
:-)
19-Sep-82 11:44 Scott E Fahlman
|
|
From: Reid T. <Rei...@at...> - 2003-09-29 19:28:24
|
#inlcude <cstdlib> -> include not inlcude
reid
> -----Original Message-----
> From: Opacki, Joseph [mailto:Jos...@ng...]=20
> Sent: Monday, September 29, 2003 9:46 AM
> To: 'dev...@li...'
> Subject: [Dev-C++] Newbie: Error in IOSTREAM declaration
>=20
>=20
> I'm new to this, can someone help we pinpoint the error?
>=20
> Thanks...Joe
>=20
> ***ERROR***
> 2 C:\compile\compile.cpp:3 invalid preprocessing directive
> #inlcude
>=20
> ***CODE***
> // program to compute bill for either a wholesale or retail=20
> purchase #include <iostream> #inlcude <cstdlib>
>=20
> using namespace std;
>=20
> const double TAX_RATE =3D 0.05; // 5% sales tax
>=20
> int main()
> {
> char salesType, ans;
> int number;
> double price, total;
> =20
> do
> {
> cout << "Enter price $";
> cin >> price;
> cout << "Enter number purchased: ";
> cin >> number;
> cout << "Type W if this a wholesale purchase.\n"
> << "Type R if this a retail purchase.\n"
> << "Then press Return.\n";
> cin >> salesType;
> =20
> if ( (salesType =3D=3D 'W') || (salesType =3D=3D 'w') )
> {
> total =3D price * number;
> } else if ( (salesType =3D=3D 'R') || (salesType =3D=3D 'r') )
> {
> double subtotal;
> subtotal =3D price * number;
> total =3D subtotal + subtotal * TAX_RATE;
> } else
> {
> cout << "Error in input" << endl;
> }
> =20
> cout.setf(ios::fixed);
> cout.setf(ios::showpoint);
> cout.precision(2);
> =20
> cout << number << "items at $" << price << endl;
> cout << "Total Bill =3D $" << total;
> =20
> if ( (salesType =3D=3D 'R') || (salesType =3D=3D 'r') )
> {
> cout << " including sales tax.\n";
> }
> =20
> cout << endl << "Would you like to try again (Y or N)? ";
> cin >> ans;
> cout << endl;
> } while (ans =3D=3D 'y' || ans =3D=3D 'Y');
> =20
>=20
> system("pause");
> return 0;
> }
>=20
>=20
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf=20
> _______________________________________________
> 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
>=20
|
|
From: David M. <ci...@ya...> - 2003-09-29 19:20:19
|
Ok if I want to copy a stream to another stream I can mess
with the rdbuf members.
e.g.
fstream myfile("somefile.txt");
cout.rdbuf = myfile.rdbuf;
(or something like that)
However this only sends the data to one stream (redirects
it). How do I get a COPY of the data sent to one stream
sent to another stream.
e.g. I want to 'log' everything sent to cout to a file.
I am guessing I would use the same rdbuf members but the
question is how?
=====
Signed
David Mcken
Life Sucks
Live with it
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
|
|
From: mar1a <ma...@ho...> - 2003-09-29 18:49:08
|
In the next few days, the European Parliament will decide about the legalisation and adoption of so-called "software patents" in Europe, which are already used by large companies in other countries to put competitors out of business. This can lead to the termination of many software projects at least within Europe, because the holders of the over 30,000 already granted "software patents" (currently without a legal foundation) can claim exclusive rights and collect license fees for trivial things like "progress bars", "mouseclicks on online order forms", "scrolling within a window" and similar. That way, software developers will have to pay the "software-patentholders" for using these features, even in their own, completely self-developed applications, which can completely stall the development of innovative software for small and medium companies. Apart from this, the expense for patent inquiries and legal assistence is high, for even trying to find out if the self-developed software is possibly violating "software-patents", if you want to continue to market your software. Contrary to real patents, "software-patents" are, in the current draft, monopolization of business ideas and methods, even without any tangible technical implementation. Support NOW!!! : http://aktiv.ffii.org/eubsa/en |
|
From: Per W. <pw...@ia...> - 2003-09-29 18:44:05
|
It is a bit easier to count number of characters in the file if you move your nl++ inside the braces. EOF works just as in all other C libraries. EOF is defined as -1 and that is the return value of getchar() after last character has been read. For windows: type myfile | my_eof_program For Unix: cat myfile | ./my_eof_program should work. At least my terminals stays open if I run the program directly and enters text and end it with Ctrl-D. However, if I press Ctrl-D a second time, i.e. when I'm on the command line, I will loose my window. /Per W On Mon, 29 Sep 2003, vasanthsena x wrote: > Hi Reid, > > EOF == Ctrl-d. > > when I do that my window closes..Also why should I > include <stdlib.h>? > > I ran your program too.It doesnt work either... > > Thanks, > > S. > --- Reid Thompson <Rei...@at...> wrote: > > #include <stdio.h> > > #include <stdlib.h> > > > > main() > > { > > int c,nl=0; > > > > while (( c= getchar()) != EOF) > > { > > } > > ++nl; > > printf("%d\n",nl); > > system("PAUSE"); > > return 0; > > > > > > } > > > > else you will get number of characters entered > > rather than number of > > lines > > > > reid > > > > > > > -----Original Message----- > > > From: vasanthsena x [mailto:vas...@ya...] > > > > > Sent: Monday, September 29, 2003 12:40 PM > > > To: dev...@li... > > > Subject: [Dev-C++] Newbie Question. > > > > > > > > > Can Someone tell me how getchar() and EOF work on > > Dev > > > C++. I have written the following program to count > > # > > > of lines. > > > > > > #include <stdio.h> > > > main() > > > { > > > int c,nl=0; > > > > > > while (( c= getchar()) != EOF) > > > ++nl; > > > printf("%d\n",nl); > > > system("PAUSE"); > > > return 0; > > > > > > > > > } > > > > > > > > > now before I get any output the screen > > disappears.As > > > you can see I have included system("PAUSE"); > > > > > > > > > > > > __________________________________ > > > Do you Yahoo!? > > > The New Yahoo! Shopping - with improved product > > search > > > http://shopping.yahoo.com > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This sf.net email is sponsored by:ThinkGeek > > > Welcome to geek heaven. > > > http://thinkgeek.com/sf > > > _______________________________________________ > > > 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 > > > > > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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: vasanthsena x <vas...@ya...> - 2003-09-29 17:11:44
|
Hi Reid, EOF == Ctrl-d. when I do that my window closes..Also why should I include <stdlib.h>? I ran your program too.It doesnt work either... Thanks, S. --- Reid Thompson <Rei...@at...> wrote: > #include <stdio.h> > #include <stdlib.h> > > main() > { > int c,nl=0; > > while (( c= getchar()) != EOF) > { > } > ++nl; > printf("%d\n",nl); > system("PAUSE"); > return 0; > > > } > > else you will get number of characters entered > rather than number of > lines > > reid > > > > -----Original Message----- > > From: vasanthsena x [mailto:vas...@ya...] > > > Sent: Monday, September 29, 2003 12:40 PM > > To: dev...@li... > > Subject: [Dev-C++] Newbie Question. > > > > > > Can Someone tell me how getchar() and EOF work on > Dev > > C++. I have written the following program to count > # > > of lines. > > > > #include <stdio.h> > > main() > > { > > int c,nl=0; > > > > while (( c= getchar()) != EOF) > > ++nl; > > printf("%d\n",nl); > > system("PAUSE"); > > return 0; > > > > > > } > > > > > > now before I get any output the screen > disappears.As > > you can see I have included system("PAUSE"); > > > > > > > > __________________________________ > > Do you Yahoo!? > > The New Yahoo! Shopping - with improved product > search > > http://shopping.yahoo.com > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > 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 > > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |
|
From: <sol...@ya...> - 2003-09-29 16:42:12
|
The header has all the function and variable declarations the program needs, but the actual code is in the dll. That's just a dinamic link library: a file outside the exe that has the code which has to be executed, having the files for the exe included the header so they know there are those variables and functions somewhere - in the external dll. If you want have that code inside the exe, then you need use a static library, (those named libxxx.a). In your case your libxxx.a is what is known as import library, which includes the symbols of the dinamic library which have to be exported from the dll, but the code is still in the dll. The only solution is finding a static version of the dll. If it had been built by you, simply make the project an static link library instead a dinamic one (I mean, the project you used to build the dll). If it is a dll from some library you bought, then you'll have to check the documentation for if there is a static version or, if you got the source and built it, checking the makefiles for if there is some option so it builds as a static library. Hope this helps. P.D. - Sorry, I feel my english has been bad. Neszt Tibor wrote: >Hello! > >Could someone explain me why need any dll for my program? > >What I do: >- #include <aaa.h> >- link: -laaa (there is libaaa.a in the dev-c++ lib directory) > >Everything is ok. The project is compiled succesfully. But after starting, >the program needs aaa.dll > >Am I right, that the header and/or cpp (aaa.h, aaa.cpp) defines all the >callable functions, and the real functions is in the libaaa.a ?? > >If yes, why need the dll file? (for example if aaa=glut32, or aaa=fmod or ...) > >I simply don't want many dlls beside my program. > >I check all the regarding programs (Exebundle, Fusion, PEBundle, ...), but >there are many problem with these. > >My aim is that all the functions what I need is should be in the builded >exe file. > >So is there a soluton? Dev-c++ settings by any chance? > > >Regards, > >Neszt Tibor > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >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: vasanthsena x <vas...@ya...> - 2003-09-29 16:41:11
|
Can Someone tell me how getchar() and EOF work on Dev
C++. I have written the following program to count #
of lines.
#include <stdio.h>
main()
{
int c,nl=0;
while (( c= getchar()) != EOF)
++nl;
printf("%d\n",nl);
system("PAUSE");
return 0;
}
now before I get any output the screen disappears.As
you can see I have included system("PAUSE");
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
|
|
From: Opacki, J. <Jos...@ng...> - 2003-09-29 16:33:07
|
Thanks! An early monday morning for me... |
|
From: Per W. <pw...@ia...> - 2003-09-29 16:23:33
|
Because libaaa.a is an import library, i.e. only contains a little stub code to fetch in the aaa.dll file where the real implementation is. The stub code will load the required DLL, locate all needed symbols in the DLL, and then initialize pointers to the different functions in the DLL. /Per W On Mon, 29 Sep 2003, Neszt Tibor wrote: > Hello! > > Could someone explain me why need any dll for my program? > > What I do: > - #include <aaa.h> > - link: -laaa (there is libaaa.a in the dev-c++ lib directory) > > Everything is ok. The project is compiled succesfully. But after starting, > the program needs aaa.dll > > Am I right, that the header and/or cpp (aaa.h, aaa.cpp) defines all the > callable functions, and the real functions is in the libaaa.a ?? > > If yes, why need the dll file? (for example if aaa=glut32, or aaa=fmod or ...) > > I simply don't want many dlls beside my program. > > I check all the regarding programs (Exebundle, Fusion, PEBundle, ...), but > there are many problem with these. > > My aim is that all the functions what I need is should be in the builded > exe file. > > So is there a soluton? Dev-c++ settings by any chance? > > > Regards, > > Neszt Tibor > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > 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: Ricardo_Lopez <ri...@un...> - 2003-09-29 16:22:15
|
#inlcude <cstdlib> INCLUDE |
|
From: Per W. <pw...@ia...> - 2003-09-29 16:20:13
|
How do you spell the reserved word 'include'?
Exactly what the compiler said: it didn't recognized the word immediately
after the hash character.
/Per W
On Mon, 29 Sep 2003, Opacki, Joseph wrote:
> I'm new to this, can someone help we pinpoint the error?
>
> Thanks...Joe
>
> ***ERROR***
> 2 C:\compile\compile.cpp:3 invalid preprocessing directive
> #inlcude
>
> ***CODE***
> // program to compute bill for either a wholesale or retail purchase
> #include <iostream>
> #inlcude <cstdlib>
>
> using namespace std;
>
> const double TAX_RATE = 0.05; // 5% sales tax
>
> int main()
> {
> char salesType, ans;
> int number;
> double price, total;
>
> do
> {
> cout << "Enter price $";
> cin >> price;
> cout << "Enter number purchased: ";
> cin >> number;
> cout << "Type W if this a wholesale purchase.\n"
> << "Type R if this a retail purchase.\n"
> << "Then press Return.\n";
> cin >> salesType;
>
> if ( (salesType == 'W') || (salesType == 'w') )
> {
> total = price * number;
> } else if ( (salesType == 'R') || (salesType == 'r') )
> {
> double subtotal;
> subtotal = price * number;
> total = subtotal + subtotal * TAX_RATE;
> } else
> {
> cout << "Error in input" << endl;
> }
>
> cout.setf(ios::fixed);
> cout.setf(ios::showpoint);
> cout.precision(2);
>
> cout << number << "items at $" << price << endl;
> cout << "Total Bill = $" << total;
>
> if ( (salesType == 'R') || (salesType == 'r') )
> {
> cout << " including sales tax.\n";
> }
>
> cout << endl << "Would you like to try again (Y or N)? ";
> cin >> ans;
> cout << endl;
> } while (ans == 'y' || ans == 'Y');
>
>
> system("pause");
> return 0;
> }
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> 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: David M. <ci...@ya...> - 2003-09-29 16:14:33
|
You spelled "include" wrong on line 2 for #include
<cstdlib>
The compiler is EXTREMLY picky when it comes to spelling. A
easy way to pick out errors is to look at the line number
(in this case 2) of the error. That usually pinpoints what
statement is causing the error. The most notable exception
to this rule is forgetting a semi-colon when you do the
error is reported as coming from the next statement.
Happy Coding
David McKen
--- "Opacki, Joseph" <Jos...@ng...> wrote:
> I'm new to this, can someone help we pinpoint the error?
>
> Thanks...Joe
>
> ***ERROR***
> 2 C:\compile\compile.cpp:3 invalid preprocessing
> directive
> #inlcude
>
> ***CODE***
> // program to compute bill for either a wholesale or
> retail purchase
> #include <iostream>
> #inlcude <cstdlib>
>
> using namespace std;
>
> const double TAX_RATE = 0.05; // 5% sales tax
>
> int main()
> {
> char salesType, ans;
> int number;
> double price, total;
>
> do
> {
> cout << "Enter price $";
> cin >> price;
> cout << "Enter number purchased: ";
> cin >> number;
> cout << "Type W if this a wholesale purchase.\n"
> << "Type R if this a retail purchase.\n"
> << "Then press Return.\n";
> cin >> salesType;
>
> if ( (salesType == 'W') || (salesType == 'w') )
> {
> total = price * number;
> } else if ( (salesType == 'R') || (salesType ==
> 'r') )
> {
> double subtotal;
> subtotal = price * number;
> total = subtotal + subtotal * TAX_RATE;
> } else
> {
> cout << "Error in input" << endl;
> }
>
> cout.setf(ios::fixed);
> cout.setf(ios::showpoint);
> cout.precision(2);
>
> cout << number << "items at $" << price << endl;
> cout << "Total Bill = $" << total;
>
> if ( (salesType == 'R') || (salesType == 'r') )
> {
> cout << " including sales tax.\n";
> }
>
> cout << endl << "Would you like to try again (Y
> or N)? ";
> cin >> ans;
> cout << endl;
> } while (ans == 'y' || ans == 'Y');
>
>
> system("pause");
> return 0;
> }
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> 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
=====
Signed
David Mcken
Life Sucks
Live with it
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
|
|
From: Opacki, J. <Jos...@ng...> - 2003-09-29 15:43:24
|
I'm new to this, can someone help we pinpoint the error?
Thanks...Joe
***ERROR***
2 C:\compile\compile.cpp:3 invalid preprocessing directive
#inlcude
***CODE***
// program to compute bill for either a wholesale or retail purchase
#include <iostream>
#inlcude <cstdlib>
using namespace std;
const double TAX_RATE = 0.05; // 5% sales tax
int main()
{
char salesType, ans;
int number;
double price, total;
do
{
cout << "Enter price $";
cin >> price;
cout << "Enter number purchased: ";
cin >> number;
cout << "Type W if this a wholesale purchase.\n"
<< "Type R if this a retail purchase.\n"
<< "Then press Return.\n";
cin >> salesType;
if ( (salesType == 'W') || (salesType == 'w') )
{
total = price * number;
} else if ( (salesType == 'R') || (salesType == 'r') )
{
double subtotal;
subtotal = price * number;
total = subtotal + subtotal * TAX_RATE;
} else
{
cout << "Error in input" << endl;
}
cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(2);
cout << number << "items at $" << price << endl;
cout << "Total Bill = $" << total;
if ( (salesType == 'R') || (salesType == 'r') )
{
cout << " including sales tax.\n";
}
cout << endl << "Would you like to try again (Y or N)? ";
cin >> ans;
cout << endl;
} while (ans == 'y' || ans == 'Y');
system("pause");
return 0;
}
|