Re:[c-prog] Re: hi

2007-12-15 Thread yunai1989cool
you can change the two intergers into strings and use strcmp function; -- ŬÁ¦ ÎÒ²»ÏëÈñðÈËСÇÆÎÒ¼ÇסŶ ÔÚ2007-12-13£¬sivag9 [EMAIL PROTECTED] дµÀ£º --- [EMAIL PROTECTED], Brett McCoy [EMAIL PROTECTED] wrote: On Dec 13, 2007 5:54 AM, sivag9 [EMAIL PROTECTED] wrote: good evening

Re: [c-prog] help for string operation

2007-12-15 Thread Vivek Shivu
char date[3],month[3],yr[5]; strcpy(buffer,20071201); strncpy(yr,buffer,4);yr[4]='\0'; strcpy(month,buffer+4,2);yr[3]='\0'; strcpy(date,buffer+6);date[2]='\0'; On 12/14/07, mano M [EMAIL PROTECTED] wrote: Hi , i have string as follows. char dest[11]; char buffer[9];

[c-prog] Help!Thanks!!

2007-12-15 Thread yunai1989cool
Everytime I make a program about files the result is File could not be opened,how can I found a file ***.dat and use it in my program. -- ŬÁ¦ everytime... [Non-text portions of this message have been removed] To unsubscribe, send a blank message to mailto:[EMAIL PROTECTED]. Yahoo!

[c-prog] help

2007-12-15 Thread yunai1989cool
I just can not understand the backdate arithmeticfor example:can you give me some tips: #includestdio.hvoid search(int row,int column);/*function antetype*/ int check(int i,int j,int k,int a[][12]);char

Re: [c-prog] Difference between Integer and Long integer

2007-12-15 Thread Vivek Shivu
int Integer. 4bytes signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 long int (long) Long integer. 4bytes signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 number tat can be stored in 4 bytes of memory ranges from 0 to 2^(4*8-1) in case of unsigned nos. 4294967295 is the

Re:[c-prog] Re: hi

2007-12-15 Thread yunai1989cool
I am sorry last time I give a wrong arithmetic,strcmp can not consuel the problem. I think,it seems inpossible not to use any compare operator in the program.Though using string you must compare their longth and perhaps their first number. -- ŬÁ¦ everytime... [Non-text portions of this

[c-prog] c++ project

2007-12-15 Thread skichidoo
hi i'm from india and in need for a c++ project that involves data file handling and classes. i'm in class XII. please help me out by giving me ideas. if someone has a project, please mail it to me. thanks a lot -chehak

Re: [c-prog] c++ project

2007-12-15 Thread Thomas Hruska
skichidoo wrote: hi i'm from india and in need for a c++ project that involves data file handling and classes. i'm in class XII. please help me out by giving me ideas. if someone has a project, please mail it to me. thanks a lot -chehak While it is admirable that you are wanting

Re: [c-prog] Help!Thanks!!

2007-12-15 Thread Thomas Hruska
yunai1989cool wrote: Everytime I make a program about files the result is File could not be opened,how can I found a file ***.dat and use it in my program. -- ŬÁ¦ everytime... Huh? Could you rephrase that or show us code that demonstrates the problem? -- Thomas Hruska CubicleSoft

Re: [c-prog] help

2007-12-15 Thread Thomas Hruska
yunai1989cool wrote: I just can not understand the backdate arithmeticfor example:can you give me some tips: #includestdio.hvoid search(int row,int column);/*function antetype*/ int check(int i,int j,int k,int a[][12]);char

[c-prog] Comaparision operators

2007-12-15 Thread Mahesh s
Hi, There is an ambiguity here in comparision, please take a look at the program below, actually b value is 2 after adding the value with a since a is signed short int but the if condition in which i compare b with -1 fails. I think i am going wrong in interpreting something here. Could any of

[c-prog] Need help tracking down SegFault

2007-12-15 Thread Michael Sullivan
OK. I need help tracking down a segmentation fault. The problem is that even with the backtrace information from gdb, I'm still not exactly sure where it is occurring. Here's the backtrace info: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x4000 (LWP 31519)]

Re: [c-prog] Comaparision operators

2007-12-15 Thread Jason Pope
you're comparing a signed unsigned number. you need to compare b to an unsigned number, like 0. Mahesh s wrote: Hi, There is an ambiguity here in comparision, please take a look at the program below, actually b value is 2 after adding the value with a since a is signed short int but

Re: [c-prog] Need help tracking down SegFault

2007-12-15 Thread ed
Michael Sullivan wrote: OK. I need help tracking down a segmentation fault. The problem is that even with the backtrace information from gdb, I'm still not exactly sure where it is occurring. Here's the backtrace info: Program received signal SIGSEGV, Segmentation fault. [Switching to

Re: [c-prog] Difference between Integer and Long integer

2007-12-15 Thread Paul Herring
On Dec 15, 2007 9:55 AM, Vivek Shivu [EMAIL PROTECTED] wrote: number tat can be stored in 4 bytes of memory ranges from 0 to 2^(4*8-1) in case of unsigned nos. 4294967295 is the max positive number tat can be stored in 4bytes. in case of integers. i.e negative numbers too include.. to

Re: [c-prog] Need help tracking down SegFault

2007-12-15 Thread Michael Sullivan
On Sat, 2007-12-15 at 19:53 +, ed wrote: Michael Sullivan wrote: OK. I need help tracking down a segmentation fault. The problem is that even with the backtrace information from gdb, I'm still not exactly sure where it is occurring. Here's the backtrace info: Program received

[c-prog] Re: Difference between Integer and Long integer

2007-12-15 Thread peternilsson42
Kailash Srivastava [EMAIL PROTECTED] wrote: http://www.cplusplus.com/doc/tutorial/variables.html int Integer.4bytes signed: -2147483648 to 2147483647 unsigned: 0 to 4294967295 long int (long) Long integer. 4bytes signed: -2147483648 to 2147483647 unsigned: 0

Re: [c-prog] Need help tracking down SegFault

2007-12-15 Thread Thomas Hruska
Michael Sullivan wrote: On Sat, 2007-12-15 at 19:53 +, ed wrote: Michael Sullivan wrote: OK. I need help tracking down a segmentation fault. The problem is that even with the backtrace information from gdb, I'm still not exactly sure where it is occurring. Here's the backtrace info:

[c-prog] Dos window doesn't stay open.

2007-12-15 Thread Jon
Hello all. I am new to C++ and programming and need a little help. I started with the simple hello world program and it compiles fine, but when I run it the DOS window opens and then closes before I can even read the Hello World message. How can I make it stay open until I close it out?