dev-cpp-users Mailing List for Dev-C++ (Page 32)
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: hhh h. <the...@ho...> - 2008-03-30 16:47:00
|
deeps6ix Well, even though other estimeed members have already answered this, let me explain why char is case-sensitive; I kinda get the feeling, by your question, you do not fully understand what a char is. The datatype 'char' is a "virtual conception", in that a 'char' = 1 byte, and represents an entry of ASCII table. The 'char' type does not exist in terms that it is really a integer. Every entry of the ASCII table features a value and a charater. the first 31 entries consist of teletype control codes, like carriage return ( legacy typewriter thing, that you had to do when you wanted to change lines. ) The following 96 entries features common letters, numbers and pontuaction stuff. This, obviously represents the first 127 entries, that are, also the maximum value a byte ( signed ) can achive... but looking into ASCII table reveals Value('M') = 77 and Value('m') = 109, therefore 'm' != 'M' Check out this code, execution gives more info : <CODE LANG="C"> #include <stdio.h> int ReturnBytesInChar( unsigned char ch ) { /* Right shhifts bits out, to AND with 0000 0001*/ int i; for ( i=7*sizeof( char ) ; i >=0 ; i-- ) printf("%d", (ch >> i) & 1 ); }int ReturnBytesInInt( unsigned int ch ) { int i; for ( i=7*sizeof(int) ; i >=0 ; i-- ) printf("%d", ( ch >> i ) & 1); } int main () { char a = 'a'; unsigned int aIntegerValue = 97; unsigned int Draw; printf("Is a char = \'a\' equal a int = 97?\n\n"); if ( a == aIntegerValue ) printf("Wow, they do ? WTF!"); else printf("Nah! this guys is full of bollogny"); // This will never happen!!! heheh humor, hehe printf ("\n\nBut.. numbers of bytes allocatted for a char variable are %d and for a integer one %d\n...How can this be?", sizeof(char),sizeof(int)); printf("\n\nSimple dude :\n Check this table :\n"); for ( Draw^=Draw ; Draw != 9+sizeof(int)*7; Draw ++ ) putchar('-'); printf("\n\nChar bytes\t:\t%d\nVarDump:", sizeof( char ) ); ReturnBytesInChar( a ); printf("\n\nInt var bytes\t:\t%d\nVarDump:", sizeof( int ) ); ReturnBytesInInt( aIntegerValue ); putchar(10); for ( Draw^=Draw ; Draw != 9+sizeof(int)*7; Draw ++ ) putchar('-'); printf("\nNotice the similarities ? from the %do byte to the %do of integer the value equals \rchar's %d byte%c\n", sizeof(unsigned int)-1, sizeof(unsigned int), sizeof(char), (sizeof(char)>1) ? 's':' '); printf("What about diferent capitalizations? \'m\' and \'M\'?\nComputer see them as their values, and not letters...\n"); printf("See it as :\n\n\tAs value(\'m\') != value(\'M\') =>(implies)\n\t\t 'M' != 'm' \nAnd we can see it by the same functions above..."); printf("mess with them, and learn... and \rsee functions like fgetc() and try to understand why they are \'buggy\'"); scanf("%c",&a); }</CODE> Date: Sat, 29 Mar 2008 11:20:28 +1200From: dee...@gm...To: dev...@li...Subject: [Dev-C++] Char datatypehello all,i would like to know if the CHAR datatype is case-sensitive??i.e. should i write code like this to recognise the character or note.g. char = category;if (category == 'M') or (category == 'm')cheers..-- ---Deepesh Kapadia--- _________________________________________________________________ Instale a Barra de Ferramentas com Desktop Search e ganhe EMOTICONS para o Messenger! É GRÁTIS! http://www.msn.com.br/emoticonpack |
From: Per W. <pw...@ia...> - 2008-03-30 13:39:25
|
On Sun, 30 Mar 2008, Michal Molhanec wrote: > Per Westermark napsal(a): > > On Sun, 30 Mar 2008, Michal Molhanec wrote: > > > >> André Macário Barros napsal(a): > >>> ------xxx------ > >>> > >>> I present to you this scenario because of the following: > >>> In the early 80´s, the old 2-diskettes Turbo C was used in > >>> EE to develop a lot of systems. BCC (Borland C++) v5&6 provides > >> Do you mean Borland C++ Builder 5 & 6 ? Borland C++ was name for a > >> completely different product. > > > > No, I really think he means the original Borland C++, i.e. the successor > > to the Turbo C/C++ since the courses spends a large amount of time on > > development of command-line tools. Builder puts it's weight on > > development of GUI applications. > > But André mentions that they are using VCL. So it must be Borland C++ > Builder because original Borland C++ does not support it, just OWL and > MFC. Also Borland C++ 6 doesn't exists, last was 5.5. You might be correct. It was quite a long time since I dropped the Borland compilers, and went for Watcom, M$, gcc besides embedded compilers. I did some work with OWL before switching to MFC. > > Also two of those four years they are teaching windows apps. > > >>> and, if you are interested to talk about this, here are my > >>> questions: > >>> a) In the showed scenario how would you struct the > >>> 4-year disciplines? > >> If I haven't to stick with ANSI-C, I would probably go with .Net/C#, but > >> I understand your motivation. However the problem is that nobody uses > >> ANSI-C for GUI development, nor there is pure ANSI-C IDE for GUI > >> applications. > > > > .Net/C# are not suitable tools when the students are expected to develop > > embedded applications. How many microcontrollers do you think have a .NET > > support library? The processor may possibly have 1kB .. 512kB of program > > memory, and 16 byte .. 64kB of RAM. > > yes, but as I understand the course description the target of it is to > write standard PC apps which will through USB or another port comunicate > with external systems > Yes. But C++ means that they continue to build on their existing knowledge, and that any programming improvements they make can to some part be "moved back" to embedded programming. If the goal is the CS route, then they should learn quite a number of languaes - procedural, functional, parallell, ... By knowing a large number of languages, you can quickly pick up speed with yet more languages. On the other hand, it may take somewhile to be even decent in any language at all. I don't want people who are just so-so with a language to write the OS or the hardware drivers for a computer I'm going to use. Remember that graphical applications are no longer limited to PC machines. You have mobile phones, PDAs, digital books, ... M$ very much wants to corner the market - or actually all markets - but we are not there yet. Not everyone want to pay the license for an embedded Windows installation just because they have built a new copier with touch screen. /pwm |
From: sam R. <as...@ya...> - 2008-03-30 11:18:47
|
Why? lic...@12... wrote: There is no need to hunt for a certificate! ÔÚ2008-03-30£¬"sam Ruma" <as...@ya...> дµÀ£º Is there any programming certificate in C++ which can prove somebody's C++ ability? --------------------------------- Like movies? Here's a limited-time offer: Blockbuster Total Access for one month at no cost. --------------------------------- ÖÐ ¹ú ×î Ç¿ Íø ÓÎ --- Íø Ò× ÃÎ »Ã Î÷ ÓÎ £¬166 Íò Íæ ¼Ò ͬ ʱ ÔÚ Ïß --------------------------------- Never miss a thing. Make Yahoo your homepage. |
From: sam R. <as...@ya...> - 2008-03-30 10:54:16
|
Is there any programming certificate in C++ which can prove somebody's C++ ability? --------------------------------- Like movies? Here's a limited-time offer: Blockbuster Total Access for one month at no cost. |
From: Michal M. <mi...@mo...> - 2008-03-30 10:00:08
|
Per Westermark napsal(a): > On Sun, 30 Mar 2008, Michal Molhanec wrote: > >> André Macário Barros napsal(a): >>> ------xxx------ >>> >>> I present to you this scenario because of the following: >>> In the early 80´s, the old 2-diskettes Turbo C was used in >>> EE to develop a lot of systems. BCC (Borland C++) v5&6 provides >> Do you mean Borland C++ Builder 5 & 6 ? Borland C++ was name for a >> completely different product. > > No, I really think he means the original Borland C++, i.e. the successor > to the Turbo C/C++ since the courses spends a large amount of time on > development of command-line tools. Builder puts it's weight on > development of GUI applications. But André mentions that they are using VCL. So it must be Borland C++ Builder because original Borland C++ does not support it, just OWL and MFC. Also Borland C++ 6 doesn't exists, last was 5.5. Also two of those four years they are teaching windows apps. >>> and, if you are interested to talk about this, here are my >>> questions: >>> a) In the showed scenario how would you struct the >>> 4-year disciplines? >> If I haven't to stick with ANSI-C, I would probably go with .Net/C#, but >> I understand your motivation. However the problem is that nobody uses >> ANSI-C for GUI development, nor there is pure ANSI-C IDE for GUI >> applications. > > .Net/C# are not suitable tools when the students are expected to develop > embedded applications. How many microcontrollers do you think have a .NET > support library? The processor may possibly have 1kB .. 512kB of program > memory, and 16 byte .. 64kB of RAM. yes, but as I understand the course description the target of it is to write standard PC apps which will through USB or another port comunicate with external systems |
From: Per W. <pw...@ia...> - 2008-03-30 07:15:08
|
No, I do not think you understand the other warnings. You should not treat them as warnings, since in reality they are not warnings but errors. You have completely misunderstood the strcat() function. It's prototype is: char *strcat(char *dest, const char *src); Notice that the second parameter has the 'const' keyword, but not the first. That is absolutely vital! Why? Because the first parameter is a target buffer that will be _modified_ by the call! The second parameter is const because it will only be read. Anything pointer or buffer you use as first parameter must have write access and have enough room to hold the resulting string. What do you think happens when you do: err_msg = strcat ("Cannot open the configuration file: ", strcat(in_conf_file_name, "\n")); Hint: Your file name in in_conf_file_name will be modified to also contain a "\n". But in_conf_file_name lies in memory you do not own, and hence are not allowed to write to. Also, the text string "Cannot open the configuration file: " will also be used as a destination buffer, and will have the file name and a "\n" appended to it. But where is the room for that extra text? And MinGW will place the string literal in read-only memory, so your program will be terminated! strcat() is not a function that magically glues together two strings and returns a pointer to some internal magic result. It is a function that takes a first argument and extends it with a second string. After that, it will return a pointer to this first (now already modified) argument. So, you can use strcat() as: char buf[100]; char *res; strcpy(buf,"Hello"); strcat(buf," World!"); printf("%s\n",buf); or you can write: strcpy(buf,"Hello"); printf("%s\n",strcat(buf," World!")); or you can write: printf("%s\n",strcat(strcpy(buf,"Hello")," World!")); or you can write: res = strcat(strcpy(buf,"Hello")," World!"); printf("%s\n",res); but you can not write: res = strcat("Hello"," World!"); But in the end, why not just write: char error_buf[500]; snprintf(error_buf,sizeof(error_buf),"Can not open the configuration file %s",conf_file_name); strcat is used for glueing together strings. s(n)printf is used for creating formatted output. You are not interested in concatenating any strings... /pwm On Sun, 30 Mar 2008, Jan Mura wrote: > Hello, > > maybe it is clear but I am a little bit confused. > > This is the source code: > > #include<stdio.h> > #include<string.h> > > const char *module_name = "conf_proces.c"; > > const char *conf_file_name = "..\\conf\\conf.xml"; > > int conf_file_read(const char *in_conf_file_name) > { > const char *function_name = "conf_file_read"; > const char *err_msg; > int i; > FILE *p_fo; > > /*open and read the conf file*/ > if ((p_fo = fopen (conf_file_name, "r")) == NULL) > { > /* ERROR PROCESSING */ > err_msg = strcat ("Cannot open the configuration file: ", strcat > (in_conf_file_name, "\n")); > /* write_err (module_name, function_name, err_msg); */ > } > > > if ( (i = (fclose (p_fo) != 0))) > { > /* ERROR PROCESSING */ > err_msg = strcat ("Cannot close the configuration file: ", strcat > (in_conf_file_name, "\n")); > /* write_err (module_name, function_name, err_msg); */ > } > return 0; > } > > And this is the gcc outpput: > C:\Documents and Settings\Jan Mura\_myhome\dev\dialogues\src>gcc > conf_process.c > conf_process.c: In function `conf_file_read': > conf_process.c:27: warning: passing arg 1 of `strcat' discards qualifiers > from p > ointer target type > conf_process.c:36: warning: passing arg 1 of `strcat' discards qualifiers > from p > ointer target type > C:/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../libmingw32.a(main.o)(.text+0x10 > 6):main.c: undefined reference to `WinMain@16' > collect2: ld returned 1 exit status > > It is ok with these warnings, I understand it. > But I don't understand what means the error message about the WinMain > function. There is no main neither WinMain. I don't use windows.h, Win > components or anything like that. > > Jan Mura > jan...@vo... |
From: Per W. <pw...@ia...> - 2008-03-30 06:58:52
|
On Sun, 30 Mar 2008, Michal Molhanec wrote: > André Macário Barros napsal(a): > > ------xxx------ > > > > I present to you this scenario because of the following: > > In the early 80´s, the old 2-diskettes Turbo C was used in > > EE to develop a lot of systems. BCC (Borland C++) v5&6 provides > > Do you mean Borland C++ Builder 5 & 6 ? Borland C++ was name for a > completely different product. No, I really think he means the original Borland C++, i.e. the successor to the Turbo C/C++ since the courses spends a large amount of time on development of command-line tools. Builder puts it's weight on development of GUI applications. Just a note: The original Borland compiler and the Turbo Debugger are still available. They have been bought by a different company, and are sold as Paradigm C++ Professional, and are targeted for development for x86 embedded platforms. With the Paradigm linker, it is ossible map code blocks to specific memory regions. With the Paradigm debugger, it is possible to use the serial port or JTAG to debug an x86 target. > > > a way to the EE student to develop systems without the formal > > need to work in OO. I think most of this is devoted to the > > Component Based Programming style. Inside each one of the functions > > the ANSI-C is used. Minimal VCL (Virtual Component Library) is > > used (example: fscanf vs LoadFromFile). Not only in this EE course > > but in a lot of others, I found this technical behavior (to > > prefer the BCC tool). But BCC is stopped and it is necessary to > > migrate to another IDE and, perhaps another way of discipline > > structuring. > > What do you mean stopped? C++ Builder has new version nearly each year, > latest to be found at: http://www.codegear.com/products/cppbuilder > > > > > ------xxx------ > > > > I know you guys like to talk a lot more than Dev-Cpp here > > and, if you are interested to talk about this, here are my > > questions: > > a) In the showed scenario how would you struct the > > 4-year disciplines? > > If I haven't to stick with ANSI-C, I would probably go with .Net/C#, but > I understand your motivation. However the problem is that nobody uses > ANSI-C for GUI development, nor there is pure ANSI-C IDE for GUI > applications. .Net/C# are not suitable tools when the students are expected to develop embedded applications. How many microcontrollers do you think have a .NET support library? The processor may possibly have 1kB .. 512kB of program memory, and 16 byte .. 64kB of RAM. Learning to program in C for the embedded side and in C# for the Windows side may help the students to learn multiple languages which later helps them learn a third or a fourth programming language. However, that is the cs way of doing things. It may loose the studens a lot of time that they may need better for their embedded work. Going C++ for the PC side has the advantage that it is more similar to C, and as the high-end microcontrollers gets more powerful, more and more development tools will support C++. Remember that C++ was originally developed with C compatibility as a primary cornerstone. The latest C standard means that C is no longer a strict subset of C++, but close enough. The important thing is that you can take a C program, and bit by bit rewrite it into a full C++ program. Anyway, I feel that OO programming is important. People may not get the code reusability that they initially expect, but it is my experience that the additional encapsulation helps to reduce the maintenance costs significantly. And as long as the microcontroller has a real stack and registers capable of real pointer operations, it is possible to write "C programs with objects", without significantly change the memory requirements or the running speed of the embedded application. You skip any C++ libraries, templates etc but at least makes use of the C++ classes for abstraction. > > > b) With your changed (a) scenario, what IDE do you > > recommend? > > MSVC or SharpDevelop > > > c) Without changing the showed scenario, do you > > know any other tool that does the same work of BCC? > > BCC :-) > > > d) Am I wrong about MSVC? Can I do the same Component Based > > Programming using ANSI-C in the most parts of the code? > > I don't see big difference between MFC and VCL. On the other hand, I > don't think MSVC will ever have MFC-based GUI builder comparable to BCC. > > ------------------------------------------------------------------------- |
From: Michal M. <mi...@mo...> - 2008-03-30 04:45:38
|
Jan Mura napsal(a): > function. There is no main neither WinMain. I don't use windows.h, Win > components or anything like that. If there is no main or WinMain you can only compile it (Ctrl+F9) but not run. |
From: Michal M. <mi...@mo...> - 2008-03-30 03:05:02
|
André Macário Barros napsal(a): > ------xxx------ > > I present to you this scenario because of the following: > In the early 80´s, the old 2-diskettes Turbo C was used in > EE to develop a lot of systems. BCC (Borland C++) v5&6 provides Do you mean Borland C++ Builder 5 & 6 ? Borland C++ was name for a completely different product. > a way to the EE student to develop systems without the formal > need to work in OO. I think most of this is devoted to the > Component Based Programming style. Inside each one of the functions > the ANSI-C is used. Minimal VCL (Virtual Component Library) is > used (example: fscanf vs LoadFromFile). Not only in this EE course > but in a lot of others, I found this technical behavior (to > prefer the BCC tool). But BCC is stopped and it is necessary to > migrate to another IDE and, perhaps another way of discipline > structuring. What do you mean stopped? C++ Builder has new version nearly each year, latest to be found at: http://www.codegear.com/products/cppbuilder > > ------xxx------ > > I know you guys like to talk a lot more than Dev-Cpp here > and, if you are interested to talk about this, here are my > questions: > a) In the showed scenario how would you struct the > 4-year disciplines? If I haven't to stick with ANSI-C, I would probably go with .Net/C#, but I understand your motivation. However the problem is that nobody uses ANSI-C for GUI development, nor there is pure ANSI-C IDE for GUI applications. > b) With your changed (a) scenario, what IDE do you > recommend? MSVC or SharpDevelop > c) Without changing the showed scenario, do you > know any other tool that does the same work of BCC? BCC :-) > d) Am I wrong about MSVC? Can I do the same Component Based > Programming using ANSI-C in the most parts of the code? I don't see big difference between MFC and VCL. On the other hand, I don't think MSVC will ever have MFC-based GUI builder comparable to BCC. |
From: Jan M. <jan...@vo...> - 2008-03-30 01:49:58
|
Hello, maybe it is clear but I am a little bit confused. This is the source code: #include<stdio.h> #include<string.h> const char *module_name = "conf_proces.c"; const char *conf_file_name = "..\\conf\\conf.xml"; int conf_file_read(const char *in_conf_file_name) { const char *function_name = "conf_file_read"; const char *err_msg; int i; FILE *p_fo; /*open and read the conf file*/ if ((p_fo = fopen (conf_file_name, "r")) == NULL) { /* ERROR PROCESSING */ err_msg = strcat ("Cannot open the configuration file: ", strcat (in_conf_file_name, "\n")); /* write_err (module_name, function_name, err_msg); */ } if ( (i = (fclose (p_fo) != 0))) { /* ERROR PROCESSING */ err_msg = strcat ("Cannot close the configuration file: ", strcat (in_conf_file_name, "\n")); /* write_err (module_name, function_name, err_msg); */ } return 0; } And this is the gcc outpput: C:\Documents and Settings\Jan Mura\_myhome\dev\dialogues\src>gcc conf_process.c conf_process.c: In function `conf_file_read': conf_process.c:27: warning: passing arg 1 of `strcat' discards qualifiers from p ointer target type conf_process.c:36: warning: passing arg 1 of `strcat' discards qualifiers from p ointer target type C:/Dev-Cpp/bin/../lib/gcc/mingw32/3.4.2/../../../libmingw32.a(main.o)(.text+0x10 6):main.c: undefined reference to `WinMain@16' collect2: ld returned 1 exit status It is ok with these warnings, I understand it. But I don't understand what means the error message about the WinMain function. There is no main neither WinMain. I don't use windows.h, Win components or anything like that. Jan Mura jan...@vo... |
From: Per W. <pw...@ia...> - 2008-03-29 23:16:02
|
The "native" way is the one you selected, i.e. dual backslash. However, the "compatible" whay to do it is to use a single forward slash instead, i.e. "../path/filename". The C RTL on Windows will automagically translate the forward slash into a backward slash before sending the string to the OS. /pwm On Sat, 29 Mar 2008, Jan Mura wrote: > Hello, > > I need to put in a char const a full Windows path to a file. > I.e. i did it as follows > > fopen ("..\path\filename", "r"); > > It puts down some warnings about unknown escape characters. > So I rewrite it to : > > fopen ("..\\path\\filename", "r"); > > Is this correct? > > Thank you > > Jan Mura > jan...@vo... > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > 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: Chris M. <lor...@gm...> - 2008-03-29 17:57:02
|
On Sat, Mar 29, 2008 at 8:46 AM, Jan Mura <jan...@vo...> wrote: > Hello, > > I need to put in a char const a full Windows path to a file. > I.e. i did it as follows > > fopen ("..\path\filename", "r"); > > It puts down some warnings about unknown escape characters. > So I rewrite it to : > > fopen ("..\\path\\filename", "r"); > > Is this correct? Yes, that is correct. The '\' character is an escape character, used to make characters that are special (eg '\'' get's me a single quote mark). By escaping the escape character you get a single backwhack. -- Registered Linux Addict #431495 http://profile.xfire.com/mrstalinman | John 3:16! http://www.fsdev.net/ | http://lordsauron.wordpress.com/ |
From: Jan M. <jan...@vo...> - 2008-03-29 15:46:43
|
Hello, I need to put in a char const a full Windows path to a file. I.e. i did it as follows fopen ("..\path\filename", "r"); It puts down some warnings about unknown escape characters. So I rewrite it to : fopen ("..\\path\\filename", "r"); Is this correct? Thank you Jan Mura jan...@vo... |
From: André M. B. <and...@su...> - 2008-03-29 14:43:13
|
Dear Users, The EE(Electrical Engineering) course where I work has, between other disciplines, four 1-year Computer Program disciplines. The "most close" disciplines to a computer are: Microprocessors, and Digital Electronics, and Reconfigurable Computing. The main goal of the 4-disciplines is to able the student to develop applications in the computer to manage external systems through USB, serial and parallel ports. Being capable of do this, apps like robot arms, wire & wireless communications, etc are implemented (the other disciplines take care of the remaining topics). In this context the present-day situation is: 1st year: algorithms and basic programming with Dos/Console; 2nd year: intermidiate programming with Dos/Console; 3rd year: Basic & Intermediate Windows Apps, basics of computer architecture, programming through paralell & serial port; 4th year: Full systems with Windows Apps and programming through USB port. To provide a compatible learning, we decided to teach ANSI-C programming because this same type of code can be used in some microcontrollers (Microprocessors discipline) and the C2H (C To Hardware) tool in Reconfigurable Computing. We thought in the following way: there aren´t other disciplines like Software Engineering (to teach UML), Data Structures (... no comments!) and Systems Project & Analysis. Because of this, it was decided only to provide a basic learning of how to create a class, how to instanciate it and how to re-utilize it. Because of this scenario I consider very difficult to work with the students with Visual C++ (MFC... etc). ------xxx------ I present to you this scenario because of the following: In the early 80´s, the old 2-diskettes Turbo C was used in EE to develop a lot of systems. BCC (Borland C++) v5&6 provides a way to the EE student to develop systems without the formal need to work in OO. I think most of this is devoted to the Component Based Programming style. Inside each one of the functions the ANSI-C is used. Minimal VCL (Virtual Component Library) is used (example: fscanf vs LoadFromFile). Not only in this EE course but in a lot of others, I found this technical behavior (to prefer the BCC tool). But BCC is stopped and it is necessary to migrate to another IDE and, perhaps another way of discipline structuring. ------xxx------ I know you guys like to talk a lot more than Dev-Cpp here and, if you are interested to talk about this, here are my questions: a) In the showed scenario how would you struct the 4-year disciplines? b) With your changed (a) scenario, what IDE do you recommend? c) Without changing the showed scenario, do you know any other tool that does the same work of BCC? d) Am I wrong about MSVC? Can I do the same Component Based Programming using ANSI-C in the most parts of the code? Thank you, people! Regards Andre No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.1/1348 - Release Date: 28/3/2008 10:58 |
From: Philip B. <phi...@pb...> - 2008-03-28 23:32:44
|
Yes, it is definitely case sensitive. If you have a lot of options to check and a single variable that contains the current one, you could always use the function tolower which will make life a bit easier for you in that case. You just convert it to a lowercase before you start checking and then you don't need to bother about it. Regards Philip Bennefall ----- Original Message ----- From: Deepesh Kapadia To: dev...@li... Sent: Saturday, March 29, 2008 12:20 AM Subject: [Dev-C++] Char datatype hello all, i would like to know if the CHAR datatype is case-sensitive?? i.e. should i write code like this to recognise the character or not e.g. char = category; if (category == 'M') or (category == 'm') cheers.. -- ---Deepesh Kapadia--- ------------------------------------------------------------------------------ ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ------------------------------------------------------------------------------ _______________________________________________ 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...> - 2008-03-28 23:32:17
|
Of course it is case-sensitive. If it wasn't, you wouldn't be able to write any application that must be able to separate upper and lower case. /pwm On Sat, 29 Mar 2008, Deepesh Kapadia wrote: > hello all, > i would like to know if the CHAR datatype is case-sensitive?? > i.e. should i write code like this to recognise the character or not > > e.g. > char = category; > if (category == 'M') or (category == 'm') > > cheers.. > > -- > ---Deepesh Kapadia--- > |
From: Deepesh K. <dee...@gm...> - 2008-03-28 23:27:01
|
hello all, i would like to know if the CHAR datatype is case-sensitive?? i.e. should i write code like this to recognise the character or not e.g. char = category; if (category == 'M') or (category == 'm') cheers.. -- ---Deepesh Kapadia--- |
From: Per W. <pw...@ia...> - 2008-03-28 15:58:22
|
Please mail to the list, and not directly to me. You did get a result that corresponded with what you expected, and you made the incorrect assumption that your code was doing what it was expected to do. It doesn't. You then made the assumption that the code was working two days ago, and somehow have stopped working. That assumption was also wrong, since the behaviour of your code has not changed since two days ago. That was the reason why I asked you to come back and describe exactly why you think a bitwise or operation or the char() would help you figure out if you received three integers or not. An integer does not have any extra magic attributes that you can look at later to decide if it received a valid inter value or not. You must specifically check the cin >> i assignment, to see if an integer was received or not. Please read the following: http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.3 It does show the simplest C++ way to input integers, making sure that you really did receive integers. /pwm On Fri, 28 Mar 2008, sam Ruma wrote: > Well, see the attached file. > > > > > Per Westermark <pw...@ia...> wrote: > No, your code was not working fine two days ago. It was only you who did > incorrect testing of your code, and assumed that it was working! > > Exactly what do you think this line mean: > if(a|b|c == char()) > > Note that | is a bit operator. > And what do you think char() does? > > /pwm > > On Thu, 27 Mar 2008, sam Ruma wrote: > > > This code was working fine two days ago. But today it is acting weird. It runs fine but the result is wrong. It is suppose to give me a message whenever I enter character instead of number. > > ===================================================== > > #include > > #include > > using namespace std; > > int main() > > { int a,b,c; > > cout << "Enter 3 integers a,b,c \n"; > > cin >> a>>b>>c; > > cout <<"\n"; > > if(a|b|c == char()) > > > > { > > cout <<"Please don't enter characters. Enter numbers only.\n"; > > } > > else > > { if(a!=b && b!=c) > > cout << "Scalene\n"; > > else if (a==b && a!=c) > > cout <<"Isosceles\n"; > > else if (a==b && a==c) > > cout <<"Equilateral\n"; > > > > } > > system("pause"); > > return 0; > > > > } > > ======================================================== > > > > > > --------------------------------- > > Never miss a thing. Make Yahoo your homepage. > > > > > --------------------------------- > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. |
From: Per W. <pw...@ia...> - 2008-03-28 15:47:38
|
Do you need to ask? Dev-C++ is a free IDE that has it's development stopped since a couple of years. Management do like Microsoft since the Microsoft tools costs money, and money means a budget and a manager wants to control a large budget... /pwm On Fri, 28 Mar 2008, sam Ruma wrote: > Which one is more important at job market Microsoft Visual C++ or Dev-C++? > > > --------------------------------- > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. |
From: sam R. <as...@ya...> - 2008-03-28 15:45:29
|
Which one is more important at job market Microsoft Visual C++ or Dev-C++? --------------------------------- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. |
From: Per W. <pw...@ia...> - 2008-03-28 14:36:36
|
No, your code was not working fine two days ago. It was only you who did incorrect testing of your code, and assumed that it was working! Exactly what do you think this line mean: if(a|b|c == char()) Note that | is a bit operator. And what do you think char() does? /pwm On Thu, 27 Mar 2008, sam Ruma wrote: > This code was working fine two days ago. But today it is acting weird. It runs fine but the result is wrong. It is suppose to give me a message whenever I enter character instead of number. > ===================================================== > #include<iostream> > #include<cctype> > using namespace std; > int main() > { int a,b,c; > cout << "Enter 3 integers a,b,c \n"; > cin >> a>>b>>c; > cout <<"\n"; > if(a|b|c == char()) > > { > cout <<"Please don't enter characters. Enter numbers only.\n"; > } > else > { if(a!=b && b!=c) > cout << "Scalene\n"; > else if (a==b && a!=c) > cout <<"Isosceles\n"; > else if (a==b && a==c) > cout <<"Equilateral\n"; > > } > system("pause"); > return 0; > > } > ======================================================== > > > --------------------------------- > Never miss a thing. Make Yahoo your homepage. |
From: Wobien <roo...@pl...> - 2008-03-28 13:52:56
|
Hello, For information about C and C++ functions I allways look at: http://www.cppreference.com/ By the way, DevCpp is not a compiler, but an IDE. For compiling it uses a compiler, standard (but not neccessarily) a version of MinGW. Wobien ----- Original Message ----- From: "raghu vamsee" <rag...@ya...> To: <dev...@li...> Sent: Friday, March 28, 2008 11:52 AM Subject: [Dev-C++] Header file functions > Hello, > To every body.I am completely new to Dev C++ compiler. > Earlier I used to use Borland c++ compiler. > I am having little problem knowing about the functions present in header > files in INCLUDE directory. > Earlier I used to learn about functions by clicking help and exploring the > functions and their functionality. > Here I am finding difficulty. > CAN ANYBODY TELL ME HOW TO KNOW or FIND > 1) NUMBER OF FUNCTIONS IN HEADER FILE(ANY HEADER FILE IN INCLUDE > DIRECTORY) > 2) EXAMPLE OR EXPLANATION JUST LIKE IN BORLAND C++. > > Thanks to everybody. > > > Save all your chat conversations. Find them online at > http://in.messenger.yahoo.com/webmessengerpromo.php > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > 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: raghu v. <rag...@ya...> - 2008-03-28 10:52:58
|
Hello, To every body.I am completely new to Dev C++ compiler. Earlier I used to use Borland c++ compiler. I am having little problem knowing about the functions present in header files in INCLUDE directory. Earlier I used to learn about functions by clicking help and exploring the functions and their functionality. Here I am finding difficulty. CAN ANYBODY TELL ME HOW TO KNOW or FIND 1) NUMBER OF FUNCTIONS IN HEADER FILE(ANY HEADER FILE IN INCLUDE DIRECTORY) 2) EXAMPLE OR EXPLANATION JUST LIKE IN BORLAND C++. Thanks to everybody. Save all your chat conversations. Find them online at http://in.messenger.yahoo.com/webmessengerpromo.php |
From: sam R. <as...@ya...> - 2008-03-28 01:54:59
|
This code was working fine two days ago. But today it is acting weird. It runs fine but the result is wrong. It is suppose to give me a message whenever I enter character instead of number. ===================================================== #include<iostream> #include<cctype> using namespace std; int main() { int a,b,c; cout << "Enter 3 integers a,b,c \n"; cin >> a>>b>>c; cout <<"\n"; if(a|b|c == char()) { cout <<"Please don't enter characters. Enter numbers only.\n"; } else { if(a!=b && b!=c) cout << "Scalene\n"; else if (a==b && a!=c) cout <<"Isosceles\n"; else if (a==b && a==c) cout <<"Equilateral\n"; } system("pause"); return 0; } ======================================================== --------------------------------- Never miss a thing. Make Yahoo your homepage. |
From: Reid T. <rei...@at...> - 2008-03-27 23:11:36
|
frederico schardong wrote: > Hi > I must find a function similar sleep(), but function who I try must be > based on nanosecond or microsecond (no milesecond) > =) > tankyou! > > anybody go to fisl 9.0 in Porto Alegre - Brasil? > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 google man usleep google man nanosleep |