1,088 Posted Topics

Member Avatar for plike922

Either you need to get more RAM for your head, or you are ignoring on purpose what you have been told before. Why don't you post that in C++ since that's what you keep compiling your program with?

Member Avatar for rpiper138
0
83
Member Avatar for Ancient Dragon

[QUOTE=GrimJack;695846]Would you consider [URL="http://www.youtube.com/watch?v=ZOgptvjwng8"]this[/URL] a 'lowrider' pc mod?[/QUOTE] Definitely a cool mod. Didn't know mineral oil was not conductive. I wonder how bad would the smell be.

Member Avatar for GrimJack
0
90
Member Avatar for Avaleriona

[URL="http://www.cs.utsa.edu/~wagner/CS2213/stack/stack.html"]Example[/URL]

Member Avatar for Narue
0
173
Member Avatar for Dave Sinkula

[QUOTE]“We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States …

Member Avatar for Aia
0
420
Member Avatar for Ancient Dragon

Well, it appears this is as far as it will go. It is being [URL="http://valleywag.com/5051455/microsoft-to-announce-jerry-seinfeld-ads-cancelled-tomorrow"]canceled.[/URL]

Member Avatar for vmanes
0
166
Member Avatar for plike922

>How the hell did i do this! funny as hell That's nothing! I'll tell you what would be funny as hell. A new commercial with Bill Gates and Jerry Seinfeld, playing on violin [B][I]"Fiddler On The Roof"[/I][/B], as they hand stand, naked, against the wall. Makes you wonder what they …

Member Avatar for Aia
0
145
Member Avatar for plike922

>please help with this program i dont know whats wrong. This is what's wrong with it. [CODE]#include "strlib.h" #include "simpio.h" #include "genlib.h" #include "string.h" [/CODE] None of them are necessary. [ICODE]if([COLOR="Red"]getchar(ch)[/COLOR] != EOF)[/ICODE] getchar() doesn't accept arguments, and returns an int. [B]i.e.[/B] [ICODE][COLOR="Green"]if ((ch = getchar()) != EOF)[/COLOR][/ICODE] [B]reverse() [/B]doesn't …

Member Avatar for Aia
0
94
Member Avatar for califguy

>To have a doubt means that you understand something, and subsequently disagree with it. I doubt the correctness of this statement. Since doubt can arise out of uncertainty, due to lack of understanding.

Member Avatar for califguy
0
87
Member Avatar for Jawahar prabhu

The function system() requires the inclusion of the header file stdlib.h instead of process.h If you run it at the CLI you'll see the output, now if you run it in some IDE, it might flash the output too quick for you to see it. >consider me Now, would you …

Member Avatar for Aia
0
80
Member Avatar for ahspats

[ICODE]for (i = 0; text[i] != '\0'[COLOR="Red"], [/COLOR]i++)[/ICODE] Change to a ([COLOR="Green"];[/COLOR]) [ICODE]gets(text);[/ICODE] Very, very bad idea. Forget there's such a function. Not safe. [ICODE]fgets(text, sizeof text, stdin);[/ICODE] is what you want. [ICODE]fflush (stdin);[/ICODE] fflush() accepts only an output stream; anything else is undefined behavior. [CODE][COLOR="Red"]int [/COLOR]CountVowels (char text[], [COLOR="Red"]counter_t …

Member Avatar for ahspats
0
143
Member Avatar for ~s.o.s~

[QUOTE=TheNNS;664368]this is probably the worst thread ever. Daniweb has really lost quality in the last couple years.[/QUOTE] You are right. The very moment you signed up the decline in quality started.

Member Avatar for sneekula
3
427
Member Avatar for Dave Sinkula

[QUOTE=Lardmeister;676523]Are we supposed to read all of these without getting brain damage? [/QUOTE] No possible risk of harm for you then.

Member Avatar for sneekula
3
300
Member Avatar for Diode

>So once a pointer to an array is declared as in the *str line, it can't be modified. I got it now. If you are referring to something like this [ICODE]char *str = "This is a string";[/ICODE] you are correct. It is better to think of it as a string …

Member Avatar for Diode
0
2K
Member Avatar for AlSal

[ICODE]for(int i = 0; i <= 9; i++ ) [/ICODE] This should give you a warning unless you are using C99. Proper way: [CODE]int i; for (i = 0; i <= 9; i++) [/CODE] [CODE]for(int i = 0; i <= 9; i++ ) { if(charstring[i]=='0') intstring[i]=0; if(charstring[i]=='1') intstring[i]=1; if(charstring[i]=='2') intstring[i]=2; …

Member Avatar for ssharish2005
0
83
Member Avatar for plike922

>im having trouble [...] Can you explain what's the trouble you're having? What's the program doing that it isn't intended to do?

Member Avatar for ssharish2005
0
125
Member Avatar for devnar

Some to consider, [CODE] int HIGH=16; /*(Max value of an array element)+1*/[/CODE] That could be instead a constant[CODE]#define HIGH 16[/CODE] Now you can use HIGH as the subscript size of done, [CODE]int done[[COLOR="Green"]HIGH[/COLOR]]; [/CODE] All that, [CODE]time_t secs; time(&secs); /*assign 'secs' with the current time*/ srand((unsigned)secs); /*initialize the seed for …

Member Avatar for devnar
0
110
Member Avatar for mikedd

[QUOTE=mikedd;676276]...Cmon la tel me how to make the decimal putput tat read the output point zero one?[/QUOTE] I knew I should have keep my copy of the Rosetta Stone.

Member Avatar for Salem
-1
163
Member Avatar for nuceyneky

>how to eliminate 1 from my program.it should be "date 08/06/08"..please help me.. These values returned to the variable [B]t[/B] are not quite ready to show in prime time yet. They are correct but some need to be formatted to show like you want. Functions like asctime() or ctime() can …

Member Avatar for Aia
0
124
Member Avatar for PuQimX

[CODE] if(*num4>=70 [COLOR="Red"]&&[/COLOR] *num4<90) { if(num3>90) *grade='A'; else *grade='B'; } if(*num4>=50 [COLOR="Red"]&&[/COLOR] *num4<=70) { if(*num5>70) *grade='C'; else *grade='D'; } [/CODE] Substitute the (,) for what's in red.

Member Avatar for Aia
0
127
Member Avatar for plike922

[QUOTE=Salem;682433]Well that would depend on how "string" is declared in your C program.[/QUOTE] And how Getline() and strrev() play with the ENTER key, as well.

Member Avatar for Aia
0
85
Member Avatar for less123

Please, take a look [URL="http://www.daniweb.com/forums/thread93280.html"]here[/URL] at how to properly tag your code, so it can keep the format for C language. That makes it easier to read. To start: [CODE] while ([COLOR="Green"]([/COLOR]getStu(spStu,&number,&stuID,&exam1,&final)[COLOR="Green"])[/COLOR] [COLOR="Green"]!= 0[/COLOR] )[COLOR="Red"];[/COLOR] { calcGrade (exam1,final,&total,&grade); writeStu (spGrades,number,stuID,total,grade)[COLOR="Red"]!=EOF[/COLOR]; }[/CODE] Remove what's in red. Add what's in green.

Member Avatar for Aia
0
135
Member Avatar for a.kris

[URL="http://www.freeos.com/guides/lsst/ch02sec04.html"]How to define a variable.[/URL]

Member Avatar for eggi
0
203
Member Avatar for zabr

[QUOTE=olsoul_41;681243]Thanks but I like to do things on my way but still Tnx...[/QUOTE] If what you meant is that you like to learn at your own pace, and experiment and prove the conclusions you come with, as true, then I commend you for it. Just a word of caution: it …

Member Avatar for Aia
0
127
Member Avatar for LiquidScorpio81

first declare an array of integers [ICODE]int ar[COLOR="Red"][100][/COLOR];[/ICODE] second use it inside the loop [CODE]for(int i=0; i<100; i++) { ar[COLOR="Red"][i] [/COLOR]=(rand()%100); cout<<ar[COLOR="Red"][i][/COLOR]<<" "; } [/CODE]

Member Avatar for Salem
0
87
Member Avatar for vijaysoft1

[QUOTE=Narue;677810] >char *typed; >gets(typed); That's just brilliant. Not only did you fail to allocate memory to typed (who knows where those characters are being written), you chose to use gets despite the fact that it's impossible to use safely and ultimately one huge ugly wart on the face of C. …

Member Avatar for Narue
0
122
Member Avatar for c_ytsui

>I use the atoi function to do the conversion Take a look at strtol(), it would be better, atoi() has poor error handling

Member Avatar for jephthah
0
172
Member Avatar for Dave Sinkula

Somehow we got infected with a strong case of [URL="http://i.ehow.com/images/GlobalPhoto/Articles/2023759/ostrich_head_in_ground_Full.jpg"]ostrich syndrome [/URL]

Member Avatar for GrimJack
0
610
Member Avatar for SiRuS

[QUOTE=Narue;677741]>Hello guys this is my code. It's not often that looking at code can leave me speechless.[/QUOTE] :icon_biggrin: Glad of your prompt recovery, otherwise, I can not fathom what a post of yours, in full bloom speech mode would have meant. :P [QUOTE=Narue;677741] >int* cVec = (int*)malloc ( alloc ); …

Member Avatar for Ancient Dragon
0
166
Member Avatar for Salem

[QUOTE=MidiMagic;670012][...] If they don't use the code tags, they don't use the code tags. Ignore it. The polar ice cap won't melt because they forgot the code tags.[/QUOTE] Ignoring is going to make it worse. There's a reason why some forms of conduct are not allow in a cinema. [I][B]i.e.[/B][/I] …

Member Avatar for jasimp
1
190
Member Avatar for vijaysoft1

Before anything else you need to understand the basics. [CODE]char *typedword; / Accept a word from user printf("Enter the word"); gets(typedword); [/CODE] That doesn't work at many levels. [ICODE]char *typedword;[/ICODE] can only hold the address of a char. It can't hold the value of a char. [ICODE]gets(typedword);[/ICODE] is not an …

Member Avatar for vijaysoft1
0
358
Member Avatar for plike922

[QUOTE=xitrum69;676177]in the main function, you have to replace the [B]displayArray (numbers)[/B] with the [B]display (numbers)[/B] function. Have fun.[/QUOTE] Or vice versa, that's why Salem said: "Be consistent!"

Member Avatar for Aia
0
84
Member Avatar for ambarisha.kn
Member Avatar for ArkM
0
856
Member Avatar for jobs

[QUOTE=jobs;497707] I wouldn't know how max characters in the file, is there a way to tell C to just read until \n?[/QUOTE] Yes there's a way in C to just read until the '\n'. Nevertheless, that will not help you in what you want to do. Create a buffer with …

Member Avatar for Narue
0
266
Member Avatar for ovais2k1

If you give us your address as well, we can arrange to send you a complementary bouquet of flowers with it. Make sure you read details [URL="http://www.daniweb.com/forums/announcement118-2.html"]here[/URL].

Member Avatar for ovais2k1
0
138
Member Avatar for plike922

Are you programming in C or in C++? [CODE]#include <cstdio> #include <iostream> using namespace std; [/CODE] All these belongs to the C++ language. [CODE=c]int main( void ) { /* needs to return 0; on success */ }[/CODE]

Member Avatar for Aia
0
81
Member Avatar for Jadellll

[QUOTE=sneekula;671606] Here is an example in C language: [code=c]// spell a text string forward and backward #include <stdio.h> int main(void) { char text[80]; int k; strcpy(text, "Spell this string forward then backward"); printf("String = %s \n", text); // forward spelling puts a space between characters for(k = 0; k < …

Member Avatar for Aia
0
140
Member Avatar for Salem

[QUOTE=Ene Uran;659078]I think the new Pope is quite hip! Let's support the poor fellow with your tax deductible donation![/QUOTE] In Spain the working people are obligated by the state to contributed to the Roman Catholic Church whether they want or not. This is accomplished via income tax, but is not …

Member Avatar for sneekula
0
155
Member Avatar for wussa

>I'm having a bit of difficulty doing it with no errors. What do you mean by "[B]...doing it with no errors[/B]"? You are missing the closing bracket for the function sort. Your formatting needs some work. It is kind of hard to read that way. [URL="http://www.gidnetwork.com/b-38.html"]A guide here.[/URL]

Member Avatar for paragt
0
164
Member Avatar for lynlyn

>my future depends on you...-_- Then I wouldn't bet on your future. ;) Let's see where do I start? Ah, yes, use proper coding tags when you post some code in this forum. Example [URL="http://www.daniweb.com/forums/thread93280.html"]here[/URL]. [CODE] gets(new); [/CODE] Bad, bad function. gets() is not an alternative. Learn how to use …

Member Avatar for jephthah
0
181
Member Avatar for mhil_joy

[QUOTE=mhil_joy;671073] [...] I hope that you will grant my request.. [/QUOTE] We would, if you would had granted our request for you to read the forum [URL="http://www.daniweb.com/forums/announcement118-3.html"]guidelines[/URL] and post in the established [URL="http://www.daniweb.com/forums/misc-explaincode.html"]standard[/URL]. Like [URL="http://www.daniweb.com/forums/thread93280.html"]here[/URL].

Member Avatar for Aia
-2
85
Member Avatar for mdew_47

>Erm.. I think you are creating an array of 40 char pointers... Not sure tho. Nope, it is declaring a [B]pointer[/B] to an [B]array[/B] of 40 chars What you are describing would be: [ICODE]char *str[40];[/ICODE]

Member Avatar for Clockowl
0
100
Member Avatar for coolkeg

[QUOTE=coolkeg;663652]hmmm now it is saying that "printf" and "scanf" are undefined functions in lines 10/11. the other code compiles fine though. thanks again. :P[/QUOTE] It is always best if you post a copy of the actual error given to you by the compiling/linking process. Paraphrasing errors and warning messages, frequently …

Member Avatar for Aia
0
138
Member Avatar for plike922

if [B]i=1[/B] and [B]d=1[/B] would [B]d<i [/B]execute? What do you say? Would [B]if(t == i)[/B] have a chance of being execute without [B]t[/B] being initialized to any value?

Member Avatar for Aia
0
94
Member Avatar for mancode1007

[QUOTE=Ancient Dragon;669497]Another method [code] char iobuf[] = "222 chris brown 50"; char* ptr; // find beginning of name while( !isalpha(*ptr)) ptr++; memmove(iobuf,ptr,strlen(ptr)+1); // find end of name ptr = iobuf + strlen(iobuf)-1; while(!isalpha(*ptr)) ptr--; // truncate *(ptr+1) = 0; [/code][/QUOTE] That obtains the string name out of the buffer, but …

Member Avatar for Salem
0
128
Member Avatar for plike922

[QUOTE=plike922;669349][...] i tryied everything[/QUOTE] No everything. [CODE=c]int Fibonacci(int fnum) { int num1, num2, num3, fib; /* deleted n1, not needed */ num1 = 1; /* replaced 0 by 1 */ num2 = 1; /* changes in the loop: */ /* fig = 3 instead of fib=1 */ /* fig <= …

Member Avatar for Aia
0
113
Member Avatar for boatsr
Member Avatar for pipisumthin

[URL="http://www.google.com/search?hl=en&q=linux+check+if+a+file+exist+in+C%2B%2B&btnG=Google+Search"]knock yourself out.[/URL]

Member Avatar for WaltP
0
257
Member Avatar for blrjohn

[code=c] #include <stdio.h> int main() { printf("Hello World!\n"); getchar(); /* waits until user enters a key if the standard input buffer doesn't contain any */ return 0; } [/code]

Member Avatar for Aia
0
121
Member Avatar for 4th&3wood

At the bottom of every forum's main page there's the list of moderators for that forum. Click on one of them and send an email.

Member Avatar for Dave Sinkula
0
174
Member Avatar for MaestroRage

[iCODE]value=(int)argv[1];[/iCODE] That will not give you what you want. [iCODE]argv[1][/iCODE] is a string in the best case. Validate that the user entered an argument at the command line. Then use sscanf() to read that string into an int previously declared. [CODE=C] if ( sscanf( argv[1], "%d", &integer ) == 1 …

Member Avatar for jephthah
0
214

The End.