1,265 Posted Topics

Member Avatar for vikram_sriram16

[QUOTE]can u give me da code in "c" [/QUOTE] if you weren't purposely talking like a braindead AOL chatroom luser, i might actually "give u da code".

Member Avatar for jephthah
0
287
Member Avatar for SonxQ7

i assume you want to *print* a large float or double value in scientific notation. [code] double myLargeNum; ... printf("value = %.2e\n",myLargeNum); [/code] [url]http://www.cplusplus.com/reference/clibrary/cstdio/printf.html[/url] .

Member Avatar for jephthah
0
128
Member Avatar for chsarp_vijay

[URL="http://en.wikipedia.org/wiki/Dijkstra's_algorithm"]Dijkstra's Algorithm[/URL] [URL="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=12850&objectType=file"]MATLAB Code[/URL] .

Member Avatar for jephthah
0
63
Member Avatar for Diode

i just realized this thread was 2 years old oh well, whatever. here's a guy's webpage for making a beep in linux. [url]http://frank-buss.de/beep/index.html[/url] i have no idea if it works.

Member Avatar for jephthah
0
9K
Member Avatar for rob_xx17

you might try format precision specifiers if you want to reduce the number of decimal places. for instance, [B]"%.2f"[/B] will round it to two decimal places, dropping any trailing zeros in the fractional part. [code]1234.56 24.68 0.9[/code] even better, [B]"%8.03f"[/B] will round it to three decimal places, keep any trailing …

Member Avatar for jephthah
0
97
Member Avatar for narendharg

you want the source code for the standard C library? ok, here it is: [url]http://ftp.gnu.org/gnu/glibc/glibc-2.7.tar.gz[/url] now please do feel free to go and knock yourself out. and if you can manage a specific, coherent, targeted question, I'm sure someone will try to help you. but please don't feel free to …

Member Avatar for jephthah
-1
820
Member Avatar for jephthah

so... whatchyallthink? i notice that this forum gets a tiny burst of activity about once a week. before posting this thread, the last couple posts here were made 9 days ago. then the next few were 17 days ago. and this pattern seems to be the same with other multi-language …

Member Avatar for Major Major
0
263
Member Avatar for gilly_kumar

i would never use malloc() where longterm runtime stability is critical. that said, i don't understand how you can so easily rule out a memory leak. yes, i hear what you're saying about how your available memory [I]appears[/I] to be ~1GB... but to use that sort of indirect observation to …

Member Avatar for lich
0
274
Member Avatar for siripong153
Member Avatar for yelugamraghu

why are you even using the type [b]long[/b]? you know that long is an integer, right? what you are doing here is taking the [b]double[/b] floating point value [inlinecode](antal_minutter * minuttakst * 10000.0 + 0.5 )[/inlinecode], converting it into a [b]long int[/b] which drops any fractional part, then converting it …

Member Avatar for jephthah
0
273
Member Avatar for yelugamraghu

you just posted this problem yesterday, and I answered it. [url]http://www.daniweb.com/forums/thread125124.html[/url] if the answer is not sufficient, please continue to address your questions in your original post. Please don't clutter up the forums with multiple threads on the same problem. .

Member Avatar for jephthah
0
134
Member Avatar for Onixtender

are you just trying to delete the numeral characters from a string? then do something like this [code=c] void deleteNumerals(char *mystring) { char *str_ptr = mystring; while(*str_ptr) { if (*str_ptr<'0' || *str_ptr>'9') *mystring++ = *str_ptr; str_ptr++; } *mystring = '\0'; } [/code] just note that the string being pointed to …

Member Avatar for Onixtender
0
142
Member Avatar for RickN

source code is not "kind of like a programming code"... source code [B]IS[/B] the programming code. it's the entire .c file and everything in it that you wrote. so if you want to describe it, then just write -- in plain words and simple sentences -- what your code actaully …

Member Avatar for jephthah
0
127
Member Avatar for harsh2327

CodeBlocks is an IDE that can be used with most any compiler. But it is not a compiler, itself. its just a shell. so you need to use CodeBlocks in conjunction with a compiler, and preferrably one that, unlike Turbo C, is tightly bound to the ANSI standard. I think …

Member Avatar for tesuji
0
207
Member Avatar for cookiedianne760

so... what's your question now? i tried compiling your original file from post #1 and i got about 100 errors.

Member Avatar for jephthah
0
119
Member Avatar for buddha527
Member Avatar for jephthah
0
2K
Member Avatar for Prabakar

"help a little more" how can we help you if you dont give us any thing to work with. you cant plop down the description of a problem, and say "help me fix my program to work better" and then not even show us WTF you've been doing? post your …

Member Avatar for Prabakar
0
188
Member Avatar for toolbox03

nick's first suggestion is good for a single character, but you'd have to write a function to convert an entire string. something like: [code=c]void changeBufferToUpper (char *buffer) { char * buffer_ptr = buffer; size_t buffer_len = strlen(buffer); while(buffer_len--) buffer_ptr=toupper(buffer_ptr++); }[/code] as for nick's second suggestion, [icode]buffer += '0'; /* add …

Member Avatar for jephthah
0
232
Member Avatar for mattcrow

everything is urgent, it seems. people need to start posting their questions with subject headings like: "Help Help!! Life or Death Problem Here!!!" or maybe "OMG MY ASS IS ON FIRE AND MY HEAD IS A-CATCHIN', SUMBODY PLS ANSWER MY Q!!!" otherwise, im gonna get bogged down trying to answer …

Member Avatar for javaAddict
0
145
Member Avatar for kashi_787

it worked in Turbo C, because Turbo C is riddled with undefined behavior and non-ANSI libraries in standard distribution. It's the AOL of C compilers. In other words, it's a joke. Do yourself a huge favor and quit using it. anyhow.... if you're intent on keeping "header" declared as pointer, …

Member Avatar for jephthah
0
144
Member Avatar for The Dude

well, i think im pretty stupid. i spent damn near a half hour, first taking the test, then cycling through about 50 freakin adverts to get the results without giving any info, or giving false info. i finally quit and didnt get anything :grr: but my consolation is that im …

Member Avatar for jephthah
0
264
Member Avatar for sjinadasa

first off, start indenting your code blocks. you're setting yourself up for failure if you cant easily differentiate where nested conditional blocks start and stop. it's also annoying as hell to try and read someone else's code who doesn't indent. [code=c] void add() { clrscr(); int item_code = 0; char …

Member Avatar for jephthah
0
107
Member Avatar for nony0905

You know, I was going to help you, because this is an easy problem... But then i get here and see not a single code block or conditional statement is indented. I mean, look at your code, look at all those opening and closing braces lined up like little tiny …

Member Avatar for Prabakar
0
145
Member Avatar for etc123

HAY GUISE there's a CHICK with a NICE PUSSY THIS HAS NEVER BEEN DONE BEFORE HA HA, I'M ON TEH INTERWEBS!!!!1

Member Avatar for jephthah
0
167
Member Avatar for ze-m!nd

um, trying to exploit Google page rankings is a significant problem even for experts.. as a "beginner", you'll be better served trying to program a Sudoku game or something... but, if you're really intent on trying to hack some websites, most SkriptKiddi3Z prefer Perl for this sort of task... .

Member Avatar for jephthah
0
117
Member Avatar for Jennifer84

this is a job for regular expressions. try using the Regex++ library for C++ [url]http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm[/url]

Member Avatar for Radical Edward
0
91
Member Avatar for amjadamjad20

here's your problem... [code] if (rooms[i]==NULL ) { rooms[i] = &p; callDoctor(tree,i); [b][COLOR="Red"]i = 5;[/COLOR][/b] } [/code] you just set index i=5... your array only has 5 elements, 0-4. so when you try to access room[5], it craps out on you. .

Member Avatar for Duoas
0
106
Member Avatar for guest7

yeah ... i'm just not seeing where the "Urgency" is here i thought someone was bleeding on the floor.

Member Avatar for Duoas
0
96
Member Avatar for twgood

FOR or WHILE as in, [code=c]for (count=1; count<= MAX; count++) { <stuff> } ... while(count <= MAX) { <stuff> } [/code] the FOR loop will perform <stuff> MAX number of times before continuing with the rest of the program. note that the variable "count" is incremented once each time the …

Member Avatar for allen.jes
0
118
Member Avatar for web_master

good thing about shotguns is that if you're close enough you can still hit the target even if your aim is lousy.

Member Avatar for varsha0702
0
98
Member Avatar for twgood

>> 4. What will be printed if the user enters “Wingding”? well .. what happened?? if you used scanf, i'll bet it went to crap real quick. which would not be an example of "robustness". >> 7. Give a set of values that will test the normal operation of this …

Member Avatar for jephthah
0
204
Member Avatar for toolbox03

[code=c] #include <stdio.h> #include <time.h> int main () { time_t unixTime; FILE * fp; char stamp[32]; unixTime = time (NULL); fprintf (stamp,"timestamp: %ld\n", unixTime); if (fp = fopen("myfile.txt","a")) { fputs(stamp,fp); fclose(fp); } return 0; }[/code] f you want to know what "unix time" is and how you can make it …

Member Avatar for jephthah
0
99
Member Avatar for Onixtender

thats one of the most godawful implementations of a stack ive ever seen. a stack is supposed to be simple: PUSH and POP. that's it. .

Member Avatar for Onixtender
0
182
Member Avatar for RyanLeaf

i learned assembly years ago as my first language (not counting BASIC, Pascal and Fortran, which i never did anything meaningful with)... in the early 90's it was important to know Assembly to do embedded programming, because the C compilers for embedded controllers were terribly inefficient -- and expensive if …

Member Avatar for Colin Mac
0
359
Member Avatar for jbennet

i tried this once but it was lacking in immediate gratification. i think my nation eventually depleted their resources and turned to cannibalism, but i'm not for sure

Member Avatar for jephthah
0
43
Member Avatar for jephthah

... this whole reputation points and altering power business works... ive got like 70-some-odd points, but i still only have one little green box, and 1 altering point. I'd sure feel cool if i could get a few more green things ... it'd also be nice to know what the …

Member Avatar for jbennet
0
387
Member Avatar for FourOmega
Member Avatar for harsh2327

lol. dont start with Salem about void main. not only is it his [I]raison d'être[/I] ... but he's right .

Member Avatar for harsh2327
2
297
Member Avatar for wam2
Member Avatar for awoc

by just using the "e" format, you'll get standard scientific exponentiation, but it might not be exactly what you're looking for for instance if you specify 2 decimal places like so: [icode]printf("%.2e",myDoubleValue);[/icode] your example values will be printed as [icode]1.20e-5[/icode] and [icode]1.31e13[/icode] it will not force them along standard "engineering …

Member Avatar for jephthah
0
89
Member Avatar for venomlash

yeah fun stuff, but you'd better not be initiating those pranks from inside the U.S. the FCC has started prosecuting people who send phone pranks from the Internet under a provision of the Wagner-Folsom Act of 1977, the so-called "Anti-War Dialing Act". [url]http://tinyurl.com/2g9mqh[/url] .

Member Avatar for jephthah
0
139
Member Avatar for Clockowl

lol. i love these threads, only because it tends to be my own M.O.: post a question for help, then while waiting for responses to trickle in, go about trying to solve it myself anyhow. sometimes just formulating the question reveals the answer. :)

Member Avatar for jephthah
0
148
Member Avatar for edek

what did you expect it to do? you're trying to do the close and tell function on a NULL pointer. now think about that for a minute, and you should have your answer. .

Member Avatar for edek
0
459
Member Avatar for Punkis448

i can compile it and run it through some tests, if that's what you're looking for?

Member Avatar for jephthah
0
119
Member Avatar for Prabakar

i think this is an example of "obfuscated code" perl programmers also love to do stuff like this.

Member Avatar for Prabakar
0
156
Member Avatar for rkittu2000
Member Avatar for Asat232
Member Avatar for Majestics
Member Avatar for sacdpathade
0
92
Member Avatar for helloan

well, for one thing: [code] size_t i=0; /*counter for loop*/ int len; /*length of line from file*/ [/code] you've got your types switched. not really going to make a difference (size_t is typically #defined as a long int) but still... if this basic stuff is wrong, i wonder how much …

Member Avatar for jephthah
0
169
Member Avatar for El Duke

if "strtok( )" is not already a good friend of yours, you should become acquainted soon :P

Member Avatar for El Duke
0
541

The End.