1,088 Posted Topics
Re: 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 … | |
Re: 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, … | |
Re: 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 … | |
Re: 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] | |
Re: [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 … | |
[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. | |
Re: [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 … | |
Re: >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 … | |
Re: [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... | |
Re: [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 … | |
Re: [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 … | |
Re: [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? | |
Re: 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. | |
Re: [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 … | |
Re: [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 … | |
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 … | |
Re: [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 … | |
Re: 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 … | |
Re: [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 … | |
Re: 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. | |
Re: [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) … | |
Re: [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 … | |
Re: [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... … | |
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. | |
Re: 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() | |
Re: 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 … | |
Re: 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 … | |
Re: [QUOTE=IT_wannabe;874100] It is amazing how people forget what is was like when they were learning.[/QUOTE] I am still learning. | |
Re: [CODE=C]return (dumb_ass)Sturm;[/CODE]That should solve the problem. | |
Re: 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. | |
Re: 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. | |
Re: 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. | |
Re: 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. | |
Re: 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); /* … | |
Re: [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 | |
Re: sanushks> So will it help setting breakpoints.. [URL="http://dirac.org/linux/gdb/"]gdb tutorial[/URL] | |
Re: [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 ![]() | |
Re: 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 … | |
Re: 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 … | |
Re: >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. | |
Re: 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. | |
Re: >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) … | |
Re: >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. | |
Re: [URL="http://www.daniweb.com/forums/post713583-2.html"]Exclusive delivery for FandaR![/URL] | |
Re: >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, … | |
Re: Happy Easter to you as well Mr. Ancient Dragon. May we always have abundance and reason to celebrate. | |
Re: 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. | |
Re: >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 … | |
Re: >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. | |
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. |
The End.