1,265 Posted Topics
Re: turbo C is a piece of crap. use the GCC compiler (free) or MSVC compiler (free) with the Code::Blocks IDE (free). | |
Re: sniper.... hm, i hope you're not really a sniper, because, well... i guess i'd just be sad a little bit... uh, never mind. anyhow. check out my post in your other thread about 2D arrays, maybe it will help you. | |
Re: "FLOAT CODE" is meaningless. do you want to know how to display floating point values? or do you want the IEEE 754 Standard for binary floating point arithmetic? | |
Re: if i have a character array, say: [inlinecode]char myCharString[16];[/inlinecode] and i want to capitalize the first letter (ie, the first element of the array), then I use the function "toupper" found in the <string.h> library, and it will do exactly what i want it to do: [inlinecode]myCharString[0] = toupper(myCharString[0]);[/inlinecode] however... … | |
Re: MATLAB has 64-bit i/o support, via the "io64.h" library... ive never used it, but i've read people who said that it works well [url]http://matlab.izmiran.ru/help/techdoc/matlab_external/ch04cr16.html[/url] . | |
Re: its so hard to guide you on how to best prepare becasue we dont know what the focus of material was, and we dont know which aspects the professor deems to be more/less important. make sure you understand the whys and wherefores of all the problems in previous assignments. Generally … | |
Re: i can't for the life of me imagine why you would want to do such a thing. but, admittedly, i'm getting old, and my neuronic sheaths are calcifiying.... | |
Re: at this point in your programming career, you should always use #include <stdio.h> the only time you should use #include "myHeader.h" is when you wrote that file (or someone gave it to you), and you saved it to the same directory as your C file. | |
Re: not an appropriate question for a c-language forum. this is not a c-code problem --the code obviously works as designed. your problem is an IDE problem, and not one that is commonly used. the fact that an open source IDE isnt working for you the way you expect it to … | |
Re: [QUOTE=Salem;618426]And what is "the desired" effect?[/QUOTE] apparently he desires a function to convert seconds to milliseconds now where is that function? i know i left it around here somewhere.... | |
Re: AT commands are serial so you will have to first deal with USB-Serial conversion. but yeah, throw that Turbo C trash away real quick before it makes you a completely worthless programmer. (an aside to Salem, or anyone else: where are all these Turbo-C people coming from? how does Borland … | |
Re: the <dirent.h> library has the following functions [code=c] int closedir(DIR *); DIR *opendir(const char *); struct dirent *readdir(DIR *); int readdir_r(DIR *, struct dirent *, struct dirent **); void rewinddir(DIR *); void seekdir(DIR *, long int); long int telldir(DIR *); [/code] [url]http://www.opengroup.org/onlinepubs/007908799/xsh/dirent.h.html[/url] if you're confined to Windows-specific solutions, theres an … | |
Re: you got a lot of errors, but i see what you're trying to do. so at least you're on track. :) here's a few of the more obvious problems: (1) all variables should be declared before using them. I suggest that you declare the array "x" at the start of … | |
Re: so, you're just taking an EXE, all by itself, and trying to run it on the new computer? if so, maybe you should try compiling from source on the new computer and see how it works. i think youre going to need to build a distribution kit if you want … | |
Re: use those libraries (conio.h, windows.h, etc.) at you're own peril. they offer quick solutions, but are completely non-portable. you'd do much better for yourself learning to write a multi-threaded solution. | |
Re: the entire thing is a ternary (three-part) operator that evaluates to some value, and you typically use it as a conditional assignment. ([i]condition[/i]) ? [i]value if true[/i] : [i]value if false[/i] putting the condition in parentheses is not required, but it may help you to visualize it better. For example, … | |
Re: well, [inlinecode]if (a=b) { . . . }[/inlinecode] is perfectly valid, as im sure youre aware. i used to purposely code in that manner, before i got the habit slapped out of me by a principal engineer who (god forbid!) insisted code be [b]readable[/b]. :P i mean, not in such … | |
Re: [QUOTE]You will write the C++ program[/QUOTE] notice this line right here, the first line of your assignment. now, lets meditate on it for a moment... what do you imagine this means? [QUOTE] I have worked on this programming for a while , but always have problems here and there ,~ … | |
Re: um, send a wireless command to a robot who is standing by a switch? | |
Re: pseudo-code: [code]for (element = 1 to 100) array[element] = random()[/code] | |
Re: [QUOTE]i didnt really get what u r saying ... i need a prog to find the num of solution ... waitin 4 a reply as soon as possible...... thx..[/QUOTE] do u wnt da goog srch n stuf or r u wnt 4 me 2 jus prog da c code n … | |
Re: Thank the gods you finally arrived to give us the answer to this perplexing problem. and to think we were just getting ready to close this one out as "unsolved" *whew* (next time, please dont wait so long, mmmkay?) | |
Re: you need to ask a question, if you want an answer. | |
Re: 1. what's wrong with winsock, that you need some secret socket library? and i doubt VERY SERIOUSLY that it's "improved" in any way. At best, it will be equivalent. more likely it will be a level of abstraction from winsock that just adds overhead, and probably unintended bugs. 2. system("cls") … | |
| |
Re: yes.... oops. i mean, no. | |
Re: how about the part where he wanders in and says: "Hey, y'all do my homework for me, mmkay?" isnt there a link on that one? | |
Re: [QUOTE]plz solve my problem. thnk u. bye[/QUOTE] haha no thnk u bye | |
Re: VERNON: I think that giving beginners malloc is like giving a child a gun and saying "dont shoot anyone, mmkay?" ... ive become quite weary of fixing buggy programs written by someone who thinks they know how to use malloc() when the really don't. ALBAN: what Vernon is getting at, … | |
Re: here's your problem: [QUOTE=lich;614721] if(y<=1) return 1; [/QUOTE] it should be: [code=c] if(y==1) return x; if(y<=0) return 1; [/code] . | |
Re: and we're supposed to be able to debug your proprietary, enterprise-class library functions .... how? what's wrong with <time.h> that you need some non-portable obscure library to calculate UTC? . | |
Re: you noob. you're banned. just kidding. but seriously, you cant have a single array of floats "mixed with" ints. they're all either one or the other. probably floats. some of the floats just happen to not have any fractional part. i'm not sure i fully understand your question... you want … | |
Re: don't reinvent the wheel. [URL="http://gmplib.org/"]GMP (Gnu Multiple Precision) Arithmetic Library[/URL] ![]() | |
Re: if you haven't yet, you should really read the Beej Guide [url]http://www.beej.us/guide/bgnet/output/html/multipage/structs.html[/url] | |
Re: in an oversimplified nutshell: C++ is a higher level, "[URL="http://en.wikipedia.org/wiki/Object_oriented"]object-oriented[/URL]" language more suited for user-interface intensive applications. C is a lower level "[URL="http://en.wikipedia.org/wiki/Procedural_programming"]procedural[/URL]" language more suited for hardware interfacing applications. C is also the foundation of many higher-level languages, including C++. But it should be pointed out that williamhemswort's link … | |
Re: [URL="http://gmplib.org"]GNU Multiple Precision Arithmetic Library[/URL] | |
Re: you can call Perl scripts from C/C++, but it's not particularly useful if you plan on distributing your code to any other machines. because you'll either need the full Perl installation (plus any obscure modules you might use) installed on (or networked to) every target machine, or you'll need a … | |
Re: i dont have an answer to your question. but, if you don't mind me changing your question somewhat, the [i]new[/i] answer becomes: [URL="http://www.codeblocks.org/"]Code::Blocks[/URL] seriously. best thing i've found in a long time ... (with props to Salem) (ps: get the "MinGW" version. that way you can use either your MSVC … | |
Re: sounds like the bestest way to handle this is not to use a DIFF style comparison function, but merely to parse each file looking for the parameter in question. find the parameter, extract its corresponding value, compare the value(s) to each other and/or some initial/reference value this is the sort … | |
Re: or you could pass in the name of the file on the command line [code=c]int main (int argc, char **argv) { char filename[MAX_FILENAME_LEN]; if (argc>1) strcpy(filename,argv[1]); else strcpy(filename,"default.dat"); if (fopen(filename,"r+b") == NULL) { printf("file <%s> does not exist!\n",filename); exit(0); } ... }[/code] | |
Re: never mind. what he said ^ . | |
Re: when you start thinking that standard C libraries are "misbehaving", you need to take a step back and recheck your assumptions. the most likely problems are (1) a bug in your own code (2) you dont understand the function like you think you do ... (3) a distant but possible … | |
Re: what are you trying to do exactly? start and stop a webcam, or engage some of its other functions, just in an automated fashion? or will this also involve interpreting the image files in some manner? . | |
Re: "my brother" needs a tic tac toe program written "in a couple hours" LOL, you people .... i swear, where do you come from? well "your brother" is pretty much screwed, isn't he? like Salem said... we're all happy to know that that there will be one less worthless, cheating, … | |
Re: "URGENT" is so played out. But, hey, you're getting better... Your only other post here, from 5 months ago, was "HeLP I need it today" next time, try titling your post [b]"HALP HALP MY ASS IS ON FIRE!!!!!1"[/b] and lets see what happens. . | |
Re: global variables are evil. most beginners don't realize this, because in short little school programming assignments , no one cares. it becomes a major problem is "the real world" when people start relying on global variables as "duct tape" for poor program specification and implementation. because in the real world … | |
Re: i'll bet that, as part of the homework requirements, he's not allowed to use the <math.h> library | |
Re: i dont ever write pseudocode, so i have no idea what the formal structure is supposed to look like, but if someone held a gun to my head and said "GIVE ME PSEUDOCODE" ... then here's how i would start. [code]define structure named GRADES with string element NAME with integer … | |
Re: > will the above code work in dev C compiler? who knows? this thread FOUR YEARS OLD and is about a Turbo C program that was probably 10 years old when the thread was written. > Please also tell me how to capture ,store and read images using dev C. … |
The End.