Forum: Assembly May 17th, 2007 |
| Replies: 4 Views: 1,360 Re: MIPS Help hm this line is bad:
loop3: lw $s0, 0($t9)
The value of t9 is not an address its only 1. So you have illegal address exception. If your next question is why its 1 than the answer is:
lw... |
Forum: C++ May 16th, 2007 |
| Replies: 2 Views: 3,472 Re: how convert int to char? Your problem is not to convert int to char if I'm correct. You only need to check the input with
int isdigit(int character);
link (http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.2.html) |
Forum: C May 9th, 2007 |
| Replies: 14 Views: 1,588 |
Forum: C++ May 9th, 2007 |
| Replies: 3 Views: 4,342 |
Forum: C++ May 9th, 2007 |
| Replies: 21 Views: 2,723 Re: code optimization ... you can do this if you dont care for loop order.
The answer you will find if you check the asm for both cases, then U will see for which case is less asm code. |
Forum: C May 9th, 2007 |
| Replies: 6 Views: 2,179 |
Forum: C Apr 13th, 2007 |
| Replies: 4 Views: 986 Re: i=i++ link (http://c-faq.com/expr/ieqiplusplus.html) |
Forum: C Feb 9th, 2007 |
| Replies: 3 Views: 1,479 Re: C file stream Yes. With fopen, SEEK_END and ftell you can determine the size of file and after SEEK_SET read the the whole file with fread.
#include <stdio.h>
#include <stdlib.h>
int main()
{
char * buff =... |
Forum: C Jan 26th, 2007 |
| Replies: 2 Views: 589 Re: New I'm not shore that I understood your problem.
#if 0
/* you can put here anything and the compiler wouldn't consider it */
#else
/* while this part will be considered */
#endif /* if 0 */ |
Forum: C++ Jan 12th, 2007 |
| Replies: 3 Views: 1,291 Re: diff C++ Turbo C++ The g++ is comonly used by linux (but windows also can used for example cygwin emulator). Try this link (http://www.google.com/search?hl=en&lr=&q=free+%22Borland+C%2B%2B%22&btnG=Search). |
Forum: C++ Jan 12th, 2007 |
| Replies: 3 Views: 1,291 |
Forum: C++ Jan 11th, 2007 |
| Replies: 4 Views: 856 Re: Help gotoxy() (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044844545&id=1043284392) |
Forum: C Jan 11th, 2007 |
| Replies: 20 Views: 2,865 Re: Graphics in C Check this (http://www.cprogramming.com/tutorial.html). Here you have OpenGL and graphics programming tutorial. |
Forum: C++ Jan 11th, 2007 |
| Replies: 4 Views: 856 Re: Help Well the best is to avoid non standard functions so you will not have this type of problems. For clrscr() read this (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1031963460&id=1043284385). |
Forum: Assembly Dec 11th, 2006 |
| Replies: 2 Views: 3,166 |
Forum: C Dec 7th, 2006 |
| Replies: 4 Views: 937 |
Forum: C++ Dec 1st, 2006 |
| Replies: 9 Views: 1,532 |
Forum: C++ Nov 30th, 2006 |
| Replies: 1 Views: 624 |
Forum: C Nov 29th, 2006 |
| Replies: 7 Views: 1,322 Re: Saving to a file from an array in C ? Try something like this after the loop:
printf("current position = %d\n", curr = ftell(file));
fseek(file, SEEK_END, 1); /* go to end of file */
printf("last position = %d\n", last =... |
Forum: C++ Nov 29th, 2006 |
| Replies: 4 Views: 1,130 |
Forum: C Nov 29th, 2006 |
| Replies: 7 Views: 1,322 |
Forum: C Nov 29th, 2006 |
| Replies: 8 Views: 2,231 |
Forum: C Nov 22nd, 2006 |
| Replies: 9 Views: 1,267 |
Forum: C Nov 21st, 2006 |
| Replies: 9 Views: 1,267 |
Forum: C Nov 21st, 2006 |
| Replies: 7 Views: 778 |
Forum: C Nov 14th, 2006 |
| Replies: 4 Views: 977 Re: Newbie string problem Use counter which will print the chars.
for(i=0; i<totalLengthOfString; i++)
{
if(i != 0 && i % MAXIM == 0)
{
putchar('\n');
}
putchar(string[i]);
} |
Forum: C++ Nov 13th, 2006 |
| Replies: 2 Views: 1,529 |
Forum: C Nov 13th, 2006 |
| Replies: 11 Views: 2,082 |
Forum: C++ Nov 13th, 2006 |
| Replies: 3 Views: 912 |
Forum: C Nov 8th, 2006 |
| Replies: 3 Views: 1,439 |
Forum: C++ Nov 7th, 2006 |
| Replies: 4 Views: 1,365 |
Forum: C++ Nov 7th, 2006 |
| Replies: 4 Views: 1,365 |
Forum: C Nov 7th, 2006 |
| Replies: 10 Views: 2,301 Re: Removing found chars from string Hm read the first post
Whats the posibility that the string have more than 25 chars?
#include <stdio.h>
int main()
{
char p[25] = "STEPHEN JOHNSON - LTD";
char *string = p; |
Forum: C Nov 7th, 2006 |
| Replies: 10 Views: 2,301 |
Forum: C Nov 7th, 2006 |
| Replies: 10 Views: 2,301 |
Forum: C Nov 3rd, 2006 |
| Replies: 5 Views: 1,061 |
Forum: C++ Nov 3rd, 2006 |
| Replies: 3 Views: 1,291 |
Forum: C Nov 3rd, 2006 |
| Replies: 1 Views: 855 |
Forum: C Nov 2nd, 2006 |
| Replies: 1 Views: 1,015 Re: Storing file input to an array? Did you tried with fgets (http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.12.html#fgets)? For help read this (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046476070&id=1043284351) |
Forum: Assembly Nov 2nd, 2006 |
| Replies: 1 Views: 1,835 |