1,088 Posted Topics

Member Avatar for alvalany

itzAB> Can someone suggest me some way to increase my interest in C by giving examples of some marvellous things that can be done in C and CPP. Sorry no marvelous things here about C or C++. Just excruciating pain and frustration. You better off with wonderful programming languages like …

Member Avatar for sftwr21
0
201
Member Avatar for jahmassive

jahmassive> This is the code that i have, my project is to do this exact code, but with structs Instead of dumping some source code in a post, and expecting others to find out what it is intended to do, you could explain what the code is supposed to do, …

Member Avatar for Dave Sinkula
0
487
Member Avatar for Mushy-pea

Ancient Dragon >People can't just go around doing anything they dam well please. I can't go out and rape every woman I see on the street. There has to be some limits on human activity. Yes, people can go around doing what they dam well please. As long as it …

Member Avatar for Chaky
0
156
Member Avatar for nagarayan

nagarayan> please help If you want to get help, don't ignore the rules. [URL="http://www.daniweb.com/forums/thread93280.html"]Learn how to post code[/URL]

Member Avatar for nagarayan
0
2K
Member Avatar for jephthah

[QUOTE=niek_e;921809]True. Are you quiting DW only, or programming forums in general? ;) I personally find it a damn shame that you decided to quit. I'll miss the sound of the chainsaw slashing through newbies code.[/QUOTE] There's so much someone can take of void main(), fflush(stdin) and gets(line). Even with the …

Member Avatar for shadwickman
0
204
Member Avatar for Aia

[URL="http://www.youtube.com/watch?v=oLcilJGPo68&eurl=http%3A%2F%2Fcartagodelenda.blogspot.com%2F2009%2F07%2Fdrink-up.html&feature=player_embedded"]Dedicated to you[/URL], ...you all know who you are.

Member Avatar for GrimJack
0
114
Member Avatar for jcollins85

[QUOTE=jcollins85;922342]Thanks for the input but I still can't get it to read to first newline. The goal is to only print the text from the the point given by fseek to the first newline. The solutions given read to the end of file.[/QUOTE] The solutions given are not supposed to …

Member Avatar for jcollins85
0
156
Member Avatar for 9868

>What does strcat returns? The destination source >Why does this code results in run time error? Because s1 is a read only string which you can not modify and that's what you're trying to do. >Are "hello" and "world" terminated with '\0' in case of char pointers? Please describe a …

Member Avatar for Ancient Dragon
0
78
Member Avatar for Para2x

[QUOTE=Para2x;921055] but i get this error in this line : [CODE]data[i][j]=strArr[j]; [/CODE] Cannot convert char* to char[/QUOTE] Hmn! Kind like...

Member Avatar for Aia
0
125
Member Avatar for nonadoes

[QUOTE=trshaaa;911859][...] although I don't understand why did you use IF condition ...?[/QUOTE] sscanf() returns EOF if it fails or the number of items that has been successfully read. By using an if statement a minimum of checking has been accommodated. It is imperative to check the return of functions. How …

Member Avatar for nonadoes
0
220
Member Avatar for Flyin dagger

[QUOTE=Ancient Dragon;799835]One "change" the President has already made is conducting[URL="http://abcnews.go.com/Politics/Economy/story?id=6838109&page=1"] "town hall meetings[/URL]". He had one just today in Elkhart, Indiana. To my knowledge no other President has ever done that. Usually when they get into the white house they just stay there.[/QUOTE] Oowh! I just got all tingling of …

Member Avatar for Aia
0
783
Member Avatar for ndeniche

[quote=Dave Sinkula;411408]Can she cook?[/quote] That's the ultimate test. We are testing for the basics. Once that is out of the way, you can pop the question. Can you cook, honey?

Member Avatar for ditz
0
1K
Member Avatar for vandenzergen

The series of [URL="http://www.transmogrifier.org/ch-img/ch860817.gif"]rigorous[/URL] [URL="http://www.transmogrifier.org/ch-img/ch870524.gif"]experiments[/URL] have been done already.

Member Avatar for Salem
0
1K
Member Avatar for jeremyg

[B]jephthah>[/B] [I]genlib.h ... simpio.h ... strlib.h ... WTF is this???[/I] User defined header files. Just because there are not part of the standard C library doesn't mean they are not C standard compliant Therefore, [B]jephthah>[/B][I] whoever told you to use this crap is setting you up for FAIL. this is …

Member Avatar for jephthah
0
168
Member Avatar for adarshcu

[QUOTE=adarshcu;882192][code=C] int main() { char *p = "hello all "; printf(p); } [/code] I thought the above code should ve showed a compile time error. but it din , any reason how it worked?[/QUOTE] You are mistaken. [ICODE]int printf ( const char * format, ... );[/ICODE] is the prototype. You …

Member Avatar for adarshcu
0
71
Member Avatar for Aia

The reputation system was patched a while ago to not affect the score when given in the Geeks' Lounge. Nevertheless, time keeps proving, again and again, that the ability of giving reputation in the Geeks' Lounge is more of an instrument of discord than anything else, were the system is …

Member Avatar for jephthah
-1
765
Member Avatar for DinMan

[QUOTE=DinMan;881993]Hi! I would like to print a text file having some records onto the screen while running my program. Can sumone suggest me the easiest way to do it. I know I have to open the file using fopen() then what...[/QUOTE] Then you check that the return from fopen() was …

Member Avatar for Aia
0
91
Member Avatar for bugtussellmom

For your Dell you need to use the "Reinstallation CD". That would partition your hard drive the way it came first from Dell, and it will install the Operating System it came with the Computer. Floppy is a thing from the past. Installation are done today from DVD. CD's are …

Member Avatar for bugtussellmom
0
78
Member Avatar for lecotti

[QUOTE=lecotti;880380]Why do i not need an '&' ive always thought you needed that? and regardless of the file pointer name it stil gives me a partly garabge output :S[/QUOTE] file_name is a pointer already to the first character of the array. You must omit the & or do it as …

Member Avatar for BestJewSinceJC
0
107
Member Avatar for blackrobe

blackrobe> Can you please give me an example on how to use the "sed" command in this case??... I can do better than that, I will give you a link to an easy to understand [URL="http://www.gentoo.org/doc/en/articles/l-sed1.xml"]tutorial[/URL] that will initiate you to sed.

Member Avatar for blackrobe
0
153
Member Avatar for losthope10

[quote=losthope10;403296] o How many levels of nesting are there in this design? [/quote] Concerning this question, allow me to rearrange your seudocode so you can see it better. [code]input X if (0 <= X and X < 49) output "you fail" else if (50 <= X and X < 70) …

Member Avatar for bdvenom
0
141
Member Avatar for ithelp

[QUOTE=Ancient Dragon;870818]My wife does that too :)[/QUOTE] It is known that by the mouth dies the fish when it opens it to bite the hook. I say your mouth is your downfall. With such comments, you show everyone you don't have class; ...ridiculing your spouse for the sake of a …

Member Avatar for GrimJack
0
310
Member Avatar for Salem

[QUOTE=vegaseat;875998]Actually, compared to US political standards the amounts in question are pitifully small.[/QUOTE] That should make the rest of the world happy! Right? Look! At least, we are not like those suckers in USA; trying to hold the #1 position at everything they do. [Edit:] Or should I had said... …

Member Avatar for Aia
1
291
Member Avatar for Aia

Government, [URL="http://sayanythingblog.com/entry/amateur_hour_thousands_of_dead_people_getting_stimulus_checks_from_the_gove/"]at its best[/URL], taking care of you and yours. With other people's monies, of course.

Member Avatar for GrimJack
0
167
Member Avatar for Torso_Boi

srand() returns void. You are trying to assign that void return to a float. No, no! [CODE]srand( (unsigned)time(NULL) );[/CODE] That's all you need before you call rand()

Member Avatar for Torso_Boi
0
95
Member Avatar for ViLeNT

Arguments are parameters you pass to functions. Or referring to the command line is what you enter in the shell. Assuming you have a script that needs two arguments when you run it at the command line you need to provide those arguments. [ICODE]./script_name.sh argument_one argument_two[/ICODE] [B]e.g.[/B] script_format.sh [CODE=bash]#! /bin/bash …

Member Avatar for Aia
0
122
Member Avatar for cristane

As I read the comments I can not help to wonder how clueless most of you are about economics, and what has made this country the envy of many nations for a long time. It is only now, and exactly, because the same mentality of ill ideology, that we are …

Member Avatar for serkan sendur
0
186
Member Avatar for IT_wannabe

[QUOTE=IT_wannabe;874100] It is amazing how people forget what is was like when they were learning.[/QUOTE] I am still learning.

Member Avatar for Narue
0
125
Member Avatar for Sturm
Member Avatar for John A
-1
122
Member Avatar for jephthah

lolguy> you can do also Did you read post number [URL="http://www.daniweb.com/forums/post868885-2.html"]two[/URL] before? Did you notice that the thread is marked as solved? Which unless you are sure something has been overlooked, you should learn to leave alone.

Member Avatar for nalply
0
513
Member Avatar for sanushks

sanushks> Thanks! atoi works... Do you know what happens if atoi fails to convert? Your first choice of using sprintf was superior, since error checking is better with it.

Member Avatar for sanushks
0
160
Member Avatar for elitedragoon

What a way of missing the boat! None of your suggestions are a solution. The OP wants to have it display as a text. [B][I]e.i.[/I][/B] 5 = Five, 6 = Six tux4life> [...] then you should try itoa I hope you understand that itoa is not a standard C function.

Member Avatar for ArkM
0
146
Member Avatar for sanushks

cool_zephyr>[CODE]while(*temp1!='\0') { if(*temp1=='#' && *(temp1+1)=='!') { [COLOR="Red"]*temp2='~'; temp2++;[/COLOR] temp1+=2; }[/CODE] Declaring a pointer doesn't magically set apart memory for you to manipulate, so you can not write or use what you don't have.

Member Avatar for cool_zephyr
0
212
Member Avatar for Pramoda.M.A

Pramoda.M.A> whats wrong with this? [CODE=c] path = (char*)malloc(100); /* it is not recomened to cast malloc, just include stdlib.h and it'll know what to do */ /* malloc returns NULL when it can not allocate the requested memory, checking the return is a must */ pname = (char*)malloc(100); /* …

Member Avatar for Salem
0
130
Member Avatar for serkan sendur

[QUOTE=Ancient Dragon;867652]I think a name change would be a great idea :) John Doe or Bill Smith would be a good names to inherit. [/QUOTE] Anything but Joe Dick

Member Avatar for verruckt24
1
256
Member Avatar for sanushks

sanushks> So will it help setting breakpoints.. [URL="http://dirac.org/linux/gdb/"]gdb tutorial[/URL]

Member Avatar for sanushks
0
290
Member Avatar for gdreisen

[QUOTE=nadiaekhlas;869881]Make a program to calculate square numbers. If, for example, write square 9, has the answer 81.please help me with this program[/QUOTE] [URL="http://www.daniweb.com/forums/announcement118-2.html"]Panhandlers[/URL] are not allowed in this forum

Member Avatar for dmachop
0
126
Member Avatar for lolguy

lolguy> the removing of the character outside it whish should increment the j to 3 whish should remove E You are confused. [ICODE]printf("%d",j);[/ICODE] is not the subscript used to delete the matched character. [ICODE]for (i = j = 0; s[i] != '\0'; i++)[/ICODE] means, walk through the string until you …

Member Avatar for lolguy
0
163
Member Avatar for Aelphaeis

dmachop> Any question??? Yes, a couple. >#include<conio.h> >#include<fstream.h> What do you need those for? >fp=fopen("input.txt","r"); What happens if the file doesn't exist? >char str[10][10]; What happens if the file contains strings longer than 9 characters long? Or more than 10 strings? >fscanf(fp,"%s",str[i]); What happens if fscanf() is not successful reading …

Member Avatar for Narue
0
294
Member Avatar for CoolAtt

>Simple use of strlen() and a test? strlen() has to itinerate through the string to give the length, to that the check has to be performed to find that '\n'. strchr() has to itinerate through the string looking for the given char. Hard for me to see which is faster.

Member Avatar for Aia
0
5K
Member Avatar for Svolacius

Can someone show this moron why we don't give away code? Now, that's a question. [QUOTE=Svolacius;860929]I need program code in C[/QUOTE] Is not a question.

Member Avatar for Aia
0
118
Member Avatar for qajaq49

>Apparently the return value from gets() differs in some way from the return value of fgets() -- enough to break the code as I've written it. fgets() reads and include the enter key to the string, you need to remove it. Maybe something like: [CODE=c]if ( fgets(filename, sizeof filename, stdin) …

Member Avatar for qajaq49
0
701
Member Avatar for kaku_lala

>Could someone help me write an implementation of strspn in ā€˜C’. The only library function I am allowed to call from the implementation is strlen. Sure, how about this? You start and then post what you have. After that we can give you some suggestions.

Member Avatar for Aia
0
94
Member Avatar for FandaR

[URL="http://www.daniweb.com/forums/post713583-2.html"]Exclusive delivery for FandaR![/URL]

Member Avatar for Narue
0
82
Member Avatar for zoner7

>What does that mean? Easy, you are passing the wrong parameters. Q: What's argument two of RC4? A:testpw Q: What's char testpw[9][40]? A: for you to think about it. Q: What does the prototype of void RC4() says it has to be? A: [CODE]void RC4(char *realpw, [COLOR="Red"]char *testpw,[/COLOR] char increment, …

Member Avatar for Aia
0
102
Member Avatar for Ancient Dragon

Happy Easter to you as well Mr. Ancient Dragon. May we always have abundance and reason to celebrate.

Member Avatar for ddanbe
0
533
Member Avatar for robbyboy20

What is your program suppose to do? What are you struggling with? What kind of help do you need? Those are pieces of information you should have advanced in order to obtain any meaningful help.

Member Avatar for jephthah
0
190
Member Avatar for Dewey1040

>I have this[,] but there[']s a problem with a loop som[e]where[,] [because] when [it] run[s][,] it just stays blank[.] You created a nice forever loop. [CODE=c] do { j = j + 1; k = k - 1; } while( j + k != i);/* never true, since j+k will …

Member Avatar for Aia
0
121
Member Avatar for sneekula

>So the US has a long way to go! It'll take not very long to get there if the same socialist policies that are much to blame in Europe for the unemployment rates, continue to be adopted by Congress.

Member Avatar for GrimJack
0
478
Member Avatar for Aia

New join-us-start-entering-a-name-pop-up is annoying, and patronizes visitors and current members alike. Assumes that visitors will not join or will not know how to join if a pop up is not shown in their faces. My opinion, for whoever gives a darn.

Member Avatar for martin5211
0
315

The End.