1,265 Posted Topics

Member Avatar for T&T

[QUOTE]if you have a source file for this programme please attach it.[/QUOTE] ahahahahahahahahahahahah (pause, breathe) ahahahahahahahahahahahahah seriously. gtfo. .

Member Avatar for ithelp
0
68
Member Avatar for keithmolo

yeah, i really wish threads that have been inactive for more than 90 days would be automatically locked.

Member Avatar for jephthah
0
192
Member Avatar for lynlyn

If you can't figure out how to get character input from the keyboard, YOU DAMN SURE SHOULDN'T BE USING MALLOC. first learn basic programming first before starting a career in writing shitty code full of memory leaks, mmkay?

Member Avatar for jephthah
0
181
Member Avatar for Mr.UNOwen

the best way to figure out RS232 is, as you have found out, to hack through it yourself. those constants you asked about are #defined in the header file. to get an accurate delay, you can run a huge for loop and measure the realtime elapsed. then derive a value …

Member Avatar for jephthah
0
181
Member Avatar for mancode1007
Member Avatar for sreesai

Is this an assignment, just to go through and count occurrences of these particular functions within some *.c file? I ask, because for most "REAL WORLD" programs you can't just merely write a script that counts the occurrences of [B]malloc [/B]with the occurances of [B]free [/B]and check that they're equal. …

Member Avatar for dwks
0
129
Member Avatar for m_banerjeein

i know you are asking about functions, but an important thing about [B]static[/B], is that when you scope a [I]local variable[/I] as such, it will retain its value across repeated calls to the function where it is declared. this is very important when creating functions, espeically if they are intended …

Member Avatar for jephthah
0
129
Member Avatar for blrjohn
Member Avatar for loimarie

other than the fact that you're confusing linear functions with linear equations, a huge problem can be located in the title of your thread: "Turbo C" throw that crap away, now, and get a real compiler. and if you have an instructor who insists you use Turbo C, them them …

Member Avatar for jephthah
0
525
Member Avatar for flecture

yeah, what CHASTER said: the header file should only contain (1) function prototypes (2) defines (3) macros the functions themselves should be written in the *.c file.

Member Avatar for jephthah
0
83
Member Avatar for MaestroRage

here's the simple answer: [code=c] int main (int argc, char *argv[]) { int value; value = atoi(argv[1]); ... } [/code] of course that doesn't even begin to address error checking. But that wasn't your question, so I'm leaving it that out in favor of the simple answer as to why …

Member Avatar for jephthah
0
214
Member Avatar for flecture

ADAK is right, and i agree. But I also don't see a problem with giving brief, vague answers to brief, vague questions. ... continue : stops execution within a repeatable block of code and immediately "continues" execution at the first line in the top of the block. break : stops …

Member Avatar for Ancient Dragon
0
247
Member Avatar for triadR

TRIAD, your question should be "[I]how do i calculate a checksum[/I]" .... NOT "[I]how do i convert a struct to a short[/I]". the quick answer, is that you take your entire header and divide it into 2-byte "words", along their natural 16-bit boundaries, and perform a [b]1's complement addition[/b] on …

Member Avatar for jephthah
0
223
Member Avatar for Sa_FF

who knows? what little bit of code you posted makes no sense. you have no MAIN statement. i couldnt compile it if i wanted to. maybe if you post your code, we can see whats going on. but if you want me to take a stab at it, FIRST, i'd …

Member Avatar for Salem
0
123
Member Avatar for jirving
Member Avatar for rob_xx17

in <math.h> "log" is the natural logarithm (base [I]e[/I]) "log10" is the base10 logarithm .

Member Avatar for Prabakar
0
126
Member Avatar for newbiecoderguy

there was no "year 0". what we now call 1 BC was followed directly by what we now call 1 AD. (or 1 BCE followed by 1 CE, if you prefer) When the Gregorian Calendar was adopted, they "threw out" 10 days to realign the calendar with the sun. and …

Member Avatar for newbiecoderguy
0
956
Member Avatar for michinobu_zoned

[QUOTE=michinobu_zoned;633787] Maybe it's wise I don't use atoi [/QUOTE] bingo. next question: what is the point of all this? is it your entry into a Goldberg Machine contest?

Member Avatar for dwks
0
2K
Member Avatar for sivakrishna

LOL but seriously, if there ever was a problem that should be solved by Perl... this is it. look into Perl. this is the kind of problem it's designed to do. and can do it in about 3 lines of code.

Member Avatar for dwks
-2
168
Member Avatar for TheBeast32

quintillion? thats not a large number. now about seven years ago, i worked on a cryptographic accelerator with a 4,096-bit number... [B] that[/B] was large ,

Member Avatar for TheBeast32
0
110
Member Avatar for fishwater00
Member Avatar for ramya_bugbuster

you can't use any of the relational operators? >, >=, <, <=, ==, and != well, then, what do you have left that could possibly be of use? bitwise and logical operators.

Member Avatar for jephthah
0
115
Member Avatar for NiNTENDU

[QUOTE=stephen84s;636925]When you declare a "char" array as [icode]char *abc="alpha"[/icode], the string is not editable i.e. readonly, You need to declare it as [icode]char abc[]="alpha";[/icode], if you wish to edit by using the [icode]abc[index]='';[/icode] method, Why this difference exists however I am not aware of !![/QUOTE] well, y'see... hmmm... okay, i …

Member Avatar for NiNTENDU
0
151
Member Avatar for singal.mayank

your example is wrong, according to your own definition. if you want to separate sentences, then you need to also break on the exclamation point [code] [b][u]output:[/b][/u] Hello! This is MAYANK. I am a Student of "nitk." Working on a project.[/code] anyhow... time to repeat my earlier advice: the function …

Member Avatar for jephthah
0
117
Member Avatar for Davo1977
Member Avatar for singal.mayank

the function that would be helpful for you here, i think, is STRTOK in the string.h library. it will separate any text into "tokens" based on a set of "delimiters" your "tokens" will be individual lines, and your set of "delimiters" will simply be the newline character '\n' once you …

Member Avatar for singal.mayank
0
164
Member Avatar for nelledawg

nelledogg, i just gave you postive comment because i thought you wrote that nice code yourself. you said "here is the code i have written" but then you obviously dont even know how to pass arguments into a simple function, as evidenced by your attempt [icode]case 2: total_sales(double *m, char …

Member Avatar for jephthah
1
263
Member Avatar for nishanthaMe

if youre trying to connect to a URL via sockets, the IP and port you need to bind to is the URL itself, not the proxy through which you connect to the URL

Member Avatar for jephthah
0
63
Member Avatar for abilifyx
Member Avatar for govind_kishan

yeah. AT89s are Intel-8051 based architecture, not AVR. the link Sinkula gave is good. here's another -- [url]http://www.atmel.com/dyn/products/tools.asp?family_id=604[/url]

Member Avatar for jephthah
0
110
Member Avatar for fishwater00
Member Avatar for Ellisande

a char will hold a single character, which is just an 8-bit int. what information are you trying to contain in any 'square'? this doesnt seem very meaningful, to have one char value in any square...

Member Avatar for Ellisande
0
253
Member Avatar for petermichael
Member Avatar for sambafriends

I'd like to state for the record, that I agree with Ed, Nick, Dragon, and Jishnu the Second. .

Member Avatar for awi123
0
115
Member Avatar for manavsm

hey, Chap, theres nothing inherently WRONG with not breaking it into smaller functions. though it might be BETTER, its not a requirement, and you shouldnt berate the questioner because s/he didnt code the way you prefer. But I will agree, the code is nearly unreadable, yes... But that is because …

Member Avatar for jephthah
0
276
Member Avatar for sambafriends

the short answer is because your loop, "while ... getchar" is also getting, and processing, the newline character one thing to consider though, is "what if" the person enters more than one character ... DRAGON's example of just a single "getchar" will not handle that... to do so, you would …

Member Avatar for manavsm
0
163
Member Avatar for jephthah

Disclaimer: I am not a webdesigner by any means, i only know enough to get my self into trouble. Im trying to help a non-profit fix their webpage, and Im having a rotten time getting IE and Firefox to agree. the front page is a 3x3 grid of pictures that …

Member Avatar for jephthah
0
111
Member Avatar for manavsm

[b]Manvsm[/b], to summarize what I said in your other thread, [URL="http://www.daniweb.com/forums/announcement118-3.htmlhttp://www.daniweb.com/forums/announcement118-3.html"]you should learn to use CODE TAGS[/URL], if you hope to get much help around here. .

Member Avatar for jephthah
0
110
Member Avatar for scru
Member Avatar for jwenting
0
149
Member Avatar for Software guy

I'd suggest to you that STRTOK might not be the best choice here. because the delimiters in STRTOK are treated equally. STRTOK takes a string and divides it up into any number of equivalent "tokens" based on the blind application of one or more "delimiters" that are used to mark …

Member Avatar for Software guy
0
222
Member Avatar for Dave Sinkula

you forgot a main category: "drink" you pretty much just left out the entire Southeast US on that. EDIT: hmm.. looking at your map link, maybe generic "drink" was particular to VA / NC / SC.... personally I [i]hate[/i] the word "pop" used for soft drink... it sounds so ridiculous. …

Member Avatar for Infarction
0
150
Member Avatar for moogle1979

[QUOTE]I do not know if this has ever been asked in C before but[/QUOTE] only about a million times :P other than that, the link Aia gives is pretty solid. anything i might add would just be pedantry.

Member Avatar for moogle1979
0
319
Member Avatar for vidaj
Member Avatar for jephthah
0
270
Member Avatar for Clockowl

before i go any further, i want to know what kind of speeds you're currently getting. time per solution. also, do you require closed solutions, or are open solutions acceptable?

Member Avatar for Jishnu
0
164
Member Avatar for fishwater00

you've only declared the type of the structure. you havent declared any actual arrays. you have to declare an array of type "Modeldim" within the main() routine. [code]int main(int argc, char *argv[]) { int X=Y=Z=1000; int i,j,k; int NUM=10 ; Modeldim submodel[100]; [/code] this creates an array of 100 instances …

Member Avatar for jephthah
0
126
Member Avatar for ericstenson
Member Avatar for rraj.be
Member Avatar for mayu

[QUOTE]am using turboC[/quote] thats the root of all your problems. stop it. get the free MS Visual C/C++, or CodeBlocks with MinGW (GCC) compiler. [QUOTE=Ancient Dragon;627773]Upgrade to modern compiler and learn to program the real way. Turbo C was nice in its day, but like me its day has come …

Member Avatar for jephthah
0
2K
Member Avatar for sniper29

a variable is like a box, that you can keep a single value in. say your array is a FLOAT type, and it's name is "temp". Therefore, in it you keep a floating point value of the temperature. and that's it a simple (1-D) array is like a row of …

Member Avatar for jephthah
0
406
Member Avatar for abhijithda

IIRC, it prints the two 'a' characters, then it backspaces to the point between the two 'a' characters that were just printed, then it prints a newline. so the two 'a' characters remain, and the cursor is on the new line. the backspace does not delete a previously printed character. …

Member Avatar for jephthah
0
266

The End.