188 Posted Topics

Member Avatar for shermaine
Member Avatar for shermaine

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 …

Member Avatar for WaltP
0
128
Member Avatar for LieAfterLie

[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 …

Member Avatar for LieAfterLie
0
555
Member Avatar for taruj83

i is not defined in quicksort. I think that the problem is in quicksort func.

Member Avatar for iamthwee
0
176
Member Avatar for shermaine
Member Avatar for vbcielle

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?

Member Avatar for vbcielle
0
156
Member Avatar for shermaine

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.

Member Avatar for shermaine
0
98
Member Avatar for shailesh1064

>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?

Member Avatar for ~s.o.s~
0
115
Member Avatar for shermaine

Beatuify all your posts by code [URL="http://www.daniweb.com/techtalkforums/announcement8-3.html"]tags[/URL]

Member Avatar for Ancient Dragon
0
243
Member Avatar for shermaine

[URL="http://www.daniweb.com/techtalkforums/post258643.html#post258643"]http://www.daniweb.com/techtalkforums/post258643.html#post258643[/URL]

Member Avatar for Ancient Dragon
0
79
Member Avatar for saqib

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

Member Avatar for saqib
0
285
Member Avatar for jan1024188
Member Avatar for andor
0
86
Member Avatar for jan1024188

[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]

Member Avatar for andor
0
116
Member Avatar for Fatshadow

[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 …

Member Avatar for Salem
0
1K
Member Avatar for hoosier23

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 …

Member Avatar for hoosier23
0
367
Member Avatar for Ajay Raj

Try to write it on your own and when you have some code than we'll help you about the optimisation

Member Avatar for andor
0
187
Member Avatar for Sashar400
Member Avatar for Sashar400

[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 [ ] …

Member Avatar for iamthwee
0
599
Member Avatar for Little E

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.

Member Avatar for Little E
1
175
Member Avatar for compshooter
Member Avatar for darkeinjel04

[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 …

Member Avatar for andor
0
106
Member Avatar for Fabii23

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 .

Member Avatar for WaltP
0
7K
Member Avatar for skwalker112
Member Avatar for FireSBurnsmuP
1
137
Member Avatar for rati

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]

Member Avatar for rati
2
91
Member Avatar for saravana_ssk

[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 …

Member Avatar for Salem
0
102
Member Avatar for lilprogrammer

[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.

Member Avatar for andor
1
397
Member Avatar for yadavvirendra

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 …

Member Avatar for Micko
1
127
Member Avatar for CurtisBridges

[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.

Member Avatar for ~s.o.s~
1
144
Member Avatar for isaacmacdonald
Member Avatar for champos

[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 …

Member Avatar for ~s.o.s~
0
2K
Member Avatar for ssowmya

[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 …

Member Avatar for Grunt
2
966
Member Avatar for hariza

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 …

Member Avatar for WolfPack
1
1K
Member Avatar for Close Friends

[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]

Member Avatar for lakshmi.1987
0
281
Member Avatar for VinceColeman

>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

Member Avatar for FC Jamison
1
187
Member Avatar for Diode

>then I might have to suffer a non-standardized design, which isn't a big deal then use getch

Member Avatar for WaltP
1
1K
Member Avatar for beginerprograme

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]

Member Avatar for ~s.o.s~
1
133
Member Avatar for pradeepmisra

[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 …

Member Avatar for andor
0
209
Member Avatar for amano
Member Avatar for G24T

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

Member Avatar for G24T
0
115
Member Avatar for dsraju

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; } …

Member Avatar for Iqbal_h_a
0
307
Member Avatar for govinda.attal

[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 …

Member Avatar for andor
1
205
Member Avatar for dsraju

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 …

Member Avatar for ~s.o.s~
0
146
Member Avatar for dsraju

[code] #include <stdio.h> #include <stdlib.h> int func(); int main() { short mat[3][3],i,j; for(i = 0 ; i < 3 ; i++) for(j = 0 ; j < 3 ; j++) { mat[i][j] = i*10 + j; } printf(" Initialized data to: "); for(i = 0 ; i < 3 ; …

Member Avatar for ~s.o.s~
1
141
Member Avatar for the.future.zone

[QUOTE=the.future.zone] are there any real benefits to the C family languages? [/QUOTE] Yes there are. Embedded programming is hard without C.

Member Avatar for mostafadotnet
0
76
Member Avatar for mom2006
Member Avatar for GsxRacer
Member Avatar for andor

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.

Member Avatar for andor
0
330
Member Avatar for Tlhokomelo

type [inlinecode]gcc programName.c -o programName -Wall[/inlinecode] and then to execute [inlinecode]./programName[/inlinecode] -Wall is optional

Member Avatar for John A
0
159
Member Avatar for ashokkumarrsp

[URL="http://www.google.com/search?hl=en&lr=&q=state+transition+diagram&btnG=Search"]Try to search at google[/URL]

Member Avatar for Dave Sinkula
1
857
Member Avatar for misko
Member Avatar for misko
1
441

The End.