- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 69
- Posts with Upvotes
- 60
- Upvoting Members
- 11
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
188 Posted Topics
Re: I don't think that someone will provide you the source code. Try at google. I bet that you will find something | |
Re: Your type A, can it be outside of the main function? Still your pst struct is local beside that. NOTE: Instead of void main use int main. [code] void function1(void *pStr) { A * ptmp = (A *) pStr; ptmp->a = 0; ptmp->b = 0; ptmp->c = 0; ptmp->ch = … | |
Re: So if I understand corectly even you include your header files the compiler tells you that they are implicitly declared. That means that in first case they were also implicitly declared but the linker resolved the problems but with the second compiler the linker didn't resolved it. Always declare explicitly … | |
Re: you mean something like this [inlinecode] sizeof(array)/sizeof(type of array); [/inlinecode] | |
Re: [QUOTE=vbcielle;262934]how will i round off the return value to decimal place with tis function? [code] unsigned int CalculatePercentage(int TotalComponent, int PartialComponent){ return int((PartialComponent/TotalComponent)100); }[/code][/QUOTE] You must multiply with 100 (for multiplaying use [inlinecode]*[/inlinecode]). | |
Re: Can you specify your problem more clearly?[URL="http://www.google.com/search?hl=en&q=NFA+DFA&btnG=Google+Search"]Click here[/URL] | |
Re: [QUOTE=FireSBurnsmuP;256632]Okay, so what libraries are [inlinecode]getch()[/inlinecode] and [inlinecode]kbhit()[/inlinecode] included in? (I think I might test this one out, after I reformat my computer...)[/QUOTE] In conio.h but this is not standard so there are posibility that you don't have this library. | |
Re: [QUOTE=himabindu]sir, we want complete c programme for huffman encoding & decoding.im doing my b.tech project .please send me the code[/QUOTE] try google there are lots open source compresion algorithms including huffman, rle etc | |
Re: First of all add code tags. Find out why void main and gets are bad. There is many posts about them. | |
This algorithm proved to be effective when two images are combined. The picture beneath (background) is seen if alpha component of fronth picture is less then 0xFF. If alpha of front picture (src in snippet) is zero then all we see is background picture. The format of colour is ARGB … | |
Re: Tried [URL="http://www.google.com/search?hl=en&lr=&q=download+free+turbo+C+compiler&btnG=Search"]here[/URL]? | |
Re: [QUOTE=Warrior4017] does it have anything to do with the $sp or the $fp registers? I can't seem to find anywhere information on what these registers actually do. [/QUOTE] Use this pdf. The $fp and $sp registers are explained in "Procedure Calls" link [URL]http://www.cs.wisc.edu/~larus/HP_AppA.pdf[/URL] | |
Re: [QUOTE=Gigs_;260616]HI, I have exe file writen in c++ or c and wanna decompile it to source code. Is that possible? If it is, is there any decompilet that can do that? thanks![/QUOTE] Then you must learn assembler. But why do U need it? | |
Re: If you don't care about loop order in for loop then instead this [CODE] for( i=0; i<SIZE; i++) [/CODE] you can use [CODE] for( i=SIZE; i--; ) [/CODE] and the loop should be faster | |
Re: [QUOTE=rati;255260][B]i have a problem in a program i am making. In my program i need to call a function again and again until the string entered in it is not correct. Initially i was using gets() but it wasn't accepting the string.[/B] [B]i cahnged it to scanf(), so it is … | |
Re: Try memcpy or strcpy. [quote=http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.14.html] 2.14.4 memcpy Declaration: void *memcpy(void *str1, const void *str2, size_t n); Copies n characters from str2 to str1. If str1 and str2 overlap the behavior is undefined. Returns the argument str1. 2.14.13 strcpy Declaration: char *strcpy(char *str1, const char *str2); Copies the string pointed to … | |
Re: hm this line is bad: [inlinecode] loop3: lw $s0, 0($t9) [/inlinecode] 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: [code] lw $t7, 0($t6) // you putted the first element … | |
Re: Your problem is not to convert int to char if I'm correct. You only need to check the input with [inlinecode] int isdigit(int character); [/inlinecode] [URL="http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.2.html"]link[/URL] | |
Re: [quote]for (i=10; i--; )[/quote] 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. | |
Re: [QUOTE=satyanarayanam;362698]Hi, This is satya, how we can print a string in C that doesn't use printf in main or functions? plz help on this Thank u..[/QUOTE] [code=c] puts(cString); [/code] ;) | |
Re: [QUOTE=doiko;247377]please help. i am a student and my teacher needs it till 2nd of September. please help my pass the class convert from decimal in binary or in the base of 8 numerical system, (it can be used the same interelation with the suitable parameters. Also, for the storage of … ![]() | |
Re: [QUOTE=rwagnes;312819]Quick Question: Is there a way in c to read an entire file into a string or char buffer? Thanks, Elise[/QUOTE] 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. [EDIT] [code=c] #include <stdio.h> #include <stdlib.h> … | |
Re: I'm not shore that I understood your problem. [code] #if 0 /* you can put here anything and the compiler wouldn't consider it */ #else /* while this part will be considered */ #endif /* if 0 */ [/code] | |
Re: Create a thread which will have only getchar. If something pressed then set a bool value in that thread. Of course in while loop will break when the bool value is set. | |
Re: Check [URL="http://www.cprogramming.com/tutorial.html"]this[/URL]. Here you have OpenGL and graphics programming tutorial. | |
Re: C++ is a programming language and turbo C++ is a compiler. | |
Re: Well the best is to avoid non standard functions so you will not have this type of problems. For [inlinecode]clrscr()[/inlinecode] read [URL="http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1031963460&id=1043284385"]this[/URL]. | |
Re: MIPS assembler. Using SPIM simulator [code] .data str1: .asciiz "1 2 3 4 5 6 7 8 9 10" .globl main .text main: la $a0, str1 # load string address into $a0 and I/O code into $v0 li $v0, 4 syscall # execute the syscall to perform input/output # via … | |
Re: [URL="http://en.wikipedia.org/wiki/Segmentation_fault"]Segmentation fault[/URL] | |
| |
Re: If other strings are similar remove everything after the second space. | |
Re: Use function like [URL="http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.14.html#strncmp"] int strncmp(const char *str1, const char *str2, size_t n);[/URL] | |
Re: [URL="http://www.codeproject.com/cpp/PtrToPtr.asp"]Read this[/URL] | |
Re: First of all you open the file in binary mode: [inlinecode] input = fopen(argv[3], "rb"); output = fopen(argv[4], "wb"); [/inlinecode] and then using fwrite function. | |
Re: [QUOTE=sciconf;259241]If I want to exit to Dos in a C program from a Switch statement, how do I do it? Thanks[/QUOTE] So no moderators on assembly forum? This should be moved to c/c++ forum. Ok I will tell you. Suposing that your switch statemant is in main function. [code] int … | |
Re: You cant do this [code] foo(someParam, "my age is %d", age) [/code] becouse the compiler thinks the function takes 3 parametars but at his definition it takes two. | |
Re: With something like this: [code=c] if ((a[i] > '0') && (a[i] <='9')) { a[i] -= 1; } [/code] In the loop. One remark about your code. You are not obtaining the string the right way. Read [URL="http://www.daniweb.com/tutorials/tutorial45806.html"]this[/URL] | |
Re: [QUOTE=kipl20;278757]hi i need to write a while loop to print out groups of stars shown in the attachment the middle set?? cud someone provide me with an answer please as i am desperate to get it working. thanks in advance[/QUOTE] No one will help you without a try. This kind … | |
Re: I will try to answer some of yout questions. [quote] Is assembly worth learning it? [/quote] The answer is yes and no. Learn it but dont crack your head about it. [quote]1. I hear a lot of people saying that the only people still writing assembly are some crazy old … | |
Re: Use counter which will print the chars. [code=c] for(i=0; i<totalLengthOfString; i++) { if(i != 0 && i % MAXIM == 0) { putchar('\n'); } putchar(string[i]); } [/code] The second question also can solve with counter. | |
Re: Do you have memory allocation check? Implement it then you will be shore is that your problem or not. | |
Re: But this is c/c++ forum. | |
Re: [QUOTE=Ancient Dragon;271425]Please read my signature and follow the link[/QUOTE] You made a little mistake with your link. No big deal just test it and U will understand :) | |
The End.