188 Posted Topics
Re: Dude just post your error messages. I can't follow U | |
Re: You need to declare an array. For example [inlinecode]int array[MAX_ELEM][/inlinecode]. You must define MEX_ELEM (look on google whats macroes in C if U don't know). In a loop you must enter their elements. To pass the array size you can do like this [inlinecode]sizeof(array)/sizeof(int)[/inlinecode]In bigger function you need to loop … | |
Re: [QUOTE=LieAfterLie;258800]How would you make the program pause for a certain amount of time? I can't just tell it to do some trivial task over and over for so many loops, because the compiler seems to know its trivial and cuts it out. There's gotta be a simpler way anyway.[/QUOTE] Try … | |
Re: i is not defined in quicksort. I think that the problem is in quicksort func. ![]() | |
Re: don't understand your problem. In modt.txt you have [inlinecode]Have a nice day[/inlinecode] and in modt2.txt I also have the same string. >i want to save it to the 2nd file without double space This part I don't understand. Where you have double space? In 2nd file? | |
Re: Use code tags. C is case sensitive so if you declare b than you cant use B. Compile the code and fix the syntax errors. | |
Re: >I need help to either provide the C++ codes This is against the forum rules. >or point me the proper link to find the Euler cycle Did you try with google? | |
Re: Beatuify all your posts by code [URL="http://www.daniweb.com/techtalkforums/announcement8-3.html"]tags[/URL] | |
Re: [URL="http://www.daniweb.com/techtalkforums/post258643.html#post258643"]http://www.daniweb.com/techtalkforums/post258643.html#post258643[/URL] | |
Re: With which part do you have problem? Formula for conversion or programming issue? For formulas, read [URL="http://www.google.com/search?hl=en&lr=&q=formula+temperature+conversion&btnG=Search"]this[/URL]. For declaring char and inputting you got the answer from second post of this thread | |
Re: [QUOTE=jan1024188;258466]is possible to make .exe files with gcc (for win)[/QUOTE] Yes it's posible with cygwin. Did you fix the sin problem? Try to add when U compile -lm. [inlinecode] gcc example.c -o example -Wall -lm -W -pedantic -ansi [/inlinecode] | |
Re: [QUOTE=Fatshadow;258010]Sorry, What forum should i be posting in?.... i want to write the program in C++ and therefore thought i should post it in the C++ forum... Please advise!! Just to clarify, i don't want to download a file recovery program... i'm going to write a file recovery program.....and wondered … | |
Re: Yuo should run throught tutorial. You should know the diffrence from set and get. For example [code] float getLength(float) { float Len; cout << "Enter the length: "; cin >> Len; cout << endl; return Len; } [/code] you need [code] float getLength(void) { return length; } [/code] For set … | |
Re: Try to write it on your own and when you have some code than we'll help you about the optimisation | |
Re: [QUOTE=Sashar400;256824]I have #include<iomanip> header also and it's still not working.I am getting 2 dec places but it's .00 Why is that?Please help. here is the code cout << showpoint << fixed << setprecision (2); cout<<"The Mean is "<<mean<<endl; also this code is not working ,when I use the [ ] … ![]() | |
Re: You are not calculating the total gallons after first gallon input before while, and after finishing the prog you are substacting from total gallons -1. | |
Re: Did you tried cin.ignore after cin.get(ifname, 150); ? | |
Re: [QUOTE=darkeinjel04;256086]ok juz wait...im making a code for c...but still ive searched this site i saw only c++...and im trying 2 convert it into c...[/QUOTE] The point is that you need to post some code. If you find some C++ program then try to convert it to C. If you have … | |
Re: Why do you post the same question several times? Anyway becouse you are returning local variable address :p (you can conclude from the warning and from the program output that thats wrong). Read this . | |
Re: First of all your code doesn't compile without errors. Fix the errors. | |
Re: You mean segmentation fault? Accessing memory which is not suposed to access (you probably wonder wtf that means :)). It would be best to post your code so we could help you. More information [URL="http://en.wikipedia.org/wiki/Segmentation_fault"]here[/URL] | |
Re: [QUOTE=saravana_ssk;254847]Hi, I have a basic doubt about C compiler option. I have 10 functions in my environment and I want a particular function to go into a new section which will be defined in a file where the function is defined. My question is: Can we define a seperate section … | |
Re: [QUOTE=Iqbal_h_a;254792]You can refer the following code if you would like to.... [/QUOTE] For what you are using [inlinecode]#include<stdlib.h>[/inlinecode]? You dont need that. | |
Re: You should go throught pointer tutorial. OK [inlinecode]*(ptarray[i])[/inlinecode] is dereferenced pointer of [inlinecode]ptarray[i][/inlinecode]. Here is the deal. [inlinecode]ptarray[0][/inlinecode] value is address of [inlinecode]ar[/inlinecode]. When you dereference it you will have the first element of the [inlinecode]ar[/inlinecode] array which is 8. It is very similar to [inlinecode]ptarray[4][/inlinecode] becouse it's value is … | |
Re: [QUOTE=CurtisBridges;254359]Would somebody chck this code please. [/QUOTE] Why don't you use the compiler to check the code. Do you have question? check.cpp: In function `bool checker(int)': check.cpp:19: warning: control reaches end of non-void function Thats after my compiler checking. | |
Re: Instead of double use long long. | |
Re: [QUOTE=champos;254373]Hi, I have a question which i have no idea how to do manage. I need to convert a string in the format like "1 234 567" so i can do some calculations on the indvidual numbers. What is the best way to do this? Thanks[/QUOTE] Don't know is it … | |
Re: [QUOTE=ssowmya;254196]Hi, Hi friends i am new to this site.Am happy to tell you guys out there that i liked this site and all the effort that everyone has put to keep this site going. Now coming to the point,i need to decide on a project possibly in c/c++/java which is … | |
Re: The problem is that (if I understood the problem corectly) stringLen is 375 and output is 100 chars. Just you need is output[376] instead of output[100] , of course if using this string char temp[] = "<img src=\"mact.gif\" align=\"left\" hspace=12 >More precisely, our Tool will help you to identify the … | |
Re: [QUOTE=Close Friends;212822]Hi every one.. Please.. I need a program to calculate X power Y by assembely language.. Please friends help me . :-|[/QUOTE] [url]http://www.daniweb.com/techtalkforums/announcement125-2.html[/url] | |
Re: >The program will accept a non-integer value, but I want it to continue reprompting the user when a non-integer is entered. You can use fgets and then parse trought the string checking is it number or not in a do...while loop. But you need to change the logic of input | |
Re: >then I might have to suffer a non-standardized design, which isn't a big deal then use getch | |
Re: Use code tags. U need to beautify little your post. I don't think that someone will read the whole post it's enormus. First of all don't use [inlinecode]scanf("%s", string);[/inlinecode]. Read [URL="http://www.daniweb.com/tutorials/tutorial45806.html"]this[/URL] | |
Re: [QUOTE=pradeepmisra;253490]Hi guys i m new for Symbian series 60, I want to know the how to write the code to listen to a particular folder, so that if any changes happens to that folder then the application should popup a message box.[/QUOTE] Did you tried to find out at their … | |
Re: You forgot to put [/CODE] at the end of code | |
Re: It's lot easier to follow your code if you wrap your code with [TEX][code] [/code][/TEX] tags. Just to know for the future | |
Re: To allocate two dimensional arrays [code] #include <stdlib.h> #include <stdio.h> int main() { int ** array, i; array = calloc(256, sizeof(int)); if (array == NULL) { printf("No mem!\n"); return 1; } for (i=0; i<256; i++) { array[i] = calloc(256, sizeof(int)); if (array[i] == NULL) { printf("No mem!\n"); return 1; } … | |
Re: [QUOTE=govinda.attal;252142]This code does compile and generates an exe file...When I went thru disassembly, I found nothing useful in it...There were no nops in it. First of all our basic coding principles say that it should give a compiler error... compilers like msvc, gcc simply pass without giving any error or … | |
Re: Hi everbody,My below program is running successfully ,but at end it is displaying Null Pointer Assignment as output. Why ??? #include #include int main(){ float far **ptr; /* For 2-D array dynamic allocation*/ register int i,j; ptr=(float far**)calloc(256,sizeof(ptr)); if(ptr==NULL) { printf("\n No Memory! "); return 0; } for(i=0;i Put your … | |
Re: [QUOTE=the.future.zone] are there any real benefits to the C family languages? [/QUOTE] Yes there are. Embedded programming is hard without C. | |
Re: Is this the whole code? | |
| |
I noticed that there are no tutorials for asembler in the forum like for example in c/c++ forum just code snippets. Or maybe there are? If someone know their existances please notify me. | |
Re: type [inlinecode]gcc programName.c -o programName -Wall[/inlinecode] and then to execute [inlinecode]./programName[/inlinecode] -Wall is optional | |
Re: [URL="http://www.google.com/search?hl=en&lr=&q=state+transition+diagram&btnG=Search"]Try to search at google[/URL] | |
|
The End.