1,265 Posted Topics
I don't understand. Nobody in the US uses this crappy compiler with it's non-standard libraries. No one in the Western World seems to use this. even in second world countries in central and south america, they don't use this. so how is it that Borland seems to have a complete … | |
Re: Dear raghuhr84, please disregard everything Xavier666 has said. anyone who suggests flushing the input buffer or using gets() has no business instructing anyone in the C language. (I'm also concerned as to why a moderator on this site (adatapost) would endorse his "solution" by giving him a green dot, but … | |
Re: I wondered where that went... it seemed like earlier today it was there. did it just get killed today? | |
Re: your question doesnt make any sense. and we dont just hand out solutions to every beggar that comes along, anyhow. why don't you just use the security settings built into IE to whitelist/blacklist websites? reinventing the wheel is usually a waste of time, especially when you obviously don't know what … | |
Re: holy indentation, batman! :icon_eek: seriously, dude, i can't even look at that. you've got to properly indent that mess. . | |
Re: how are the number in the fields generated. they do not look random. | |
Re: is this an assignment for a C++ class? or something you're really trying to do in real life? if this is a real application, I'd say you're using the wrong language and you should seriously consider Perl. Perl was made for this problem. you'd have a complete solution that parses … | |
Re: [QUOTE]it would be nice to promote the latest threads which have not been replied to. This way people can see their thread still being alive instead of having to bump it for to keep on the first regular page.[/QUOTE] f their thread is not being replied to, then there's probably … | |
Re: back off Mister 666, the poster has done nothing wrong. there is no requirement that within the body of the code comments and output text be in English. the forum rule you cite is to discourage pidgin english and leet speak, not to enforce some anglo-centric worldview. a large percentage … | |
Re: it's not embedded, it's TurboC. yes, it is toilet paper. and now, after two years, you just floated it back to the top of the bowl. Thanks :-/ | |
Re: [QUOTE=xavier666;1072416]I was wondering whether we can even post our algorithms if the thread starter didn't even post a single code or algorithm of his/her own.[/QUOTE] there's no cut and dry rule, but you should put forth roughly the same detail and/or effort as the poster did in asking the question. … | |
Re: line 29. you can't use variables to declare an array. | |
| |
Re: well, i learn something new every day. [QUOTE]The problem is named after [URL="http://en.wikipedia.org/wiki/Flavius_Josephus"]Flavius Josephus[/URL], a Jewish historian living in the 1st century. According to Josephus' account of the siege of Yodfat, he and his 40 comrade soldiers were trapped in a cave, surrounded by Romans. They chose suicide over capture … | |
Re: [QUOTE=lisedaton;1073120]Hi everybody, so I need to give this huge proyect on monday.[/quote] well, you better get busy. [quote]i need to write a program in c[/QUOTE] okay, here's a start: [code]#include <stdio.h> int main(void) { // start coding here return 0; }[/code] | |
| |
Re: [QUOTE=Narue;1072905]I'd recommend that you reconsider your design. This kind of thing suggests that your design is awkward and ill-suited to C.[/QUOTE] curious what you would recommend. C++? or rethinking the entire approach and not attempting to type cast at all? . | |
Re: [QUOTE]my only problem is my search and delete and the search and edit...please help me. i've attached my unfinished program here:[/QUOTE] you're going to have to be a little more specific. what's your question? | |
Re: there is nothing in C demands that TRUE = 1 and FALSE = 0. macros and constants are only what you #define them to be. depending on what variation of the C environment you use, you very well may have TRUE defined as 1 and FALSE defined as 0 for … | |
| |
Re: consider the following: [code]typedef struct { char name[20]; int memory; int time; int files; } proceso; // proceso is a "type" of struct // defined as having the above elements proceso titulos[MAX_TITLES] = { // titulos is an instance of proceso {"Doom3", 500, 4,5}, // declared as an array {"Hades", … | |
Re: [QUOTE=zortec;1068164]Why is there no way to delete a post? [/quote] there is. it's done by using the "EDIT" button, and is available for the first 30 minutes after you post. it wont take the fact that you posted away, but if you've said something irretrievably stupid, you just change it … | |
Re: man, when i was in the Navy, we had our BMI regularly measured. it used some other measurements like neck and waist but essentially the same. there was a guy who had a BMI of 8 or 9. many of us had BMIs of 15 or so. the criteria that … | |
why do you think the following "solution" in the C-language forum is a good solution? [QUOTE=xavier666;1069864]The problem is that you have not flushed stdin. Put [icode]fflush(stdin);[/icode] before the [icode]scanf[/icode]. That should do it. -- [URL="http://www.daniweb.com/forums/post1069864.html#post1069864"]/forums/post1069864[/URL] [/QUOTE] ... because you actually gave it a green cookie with the comment: [QUOTE] Well … | |
Re: "fgets" is what you're looking for, at the very least. the easiest example will read the first line of the text file pointed by your FILE * into an arbitrary variable i call tempString: [code]fgets(tempString, THIRTY + 1, in)[/code] it will read up to "THIRTY + 1" characters, or until … | |
Re: if you want the capability of being able to shoot yourself in the foot, you can try [INDENT]3. use fixed width records and one or more of "fseek", "ftell", "fsetpos", and "rewind" to manipulate the filestream and edit it in-line.[/INDENT] personally, though, i would go with either one of Narue's … | |
Re: sock puppet just means an "empty head", and not implying who is in control. the emphasis is on sock; not so much on puppet. and get used to shitty ESL grad students teaching low level programming classes. i too used to be annoyed by this, but have realized that it … | |
Re: [QUOTE=William Hemsworth;1068503]I told you that was up to you. If i did that, you wouldn't have done [b]anything[/b]. In fact, most members would probably think i've already given you too much code there.[/QUOTE] YUP. but to answer the OP's second question: any loop can that can be done with a … | |
Re: why not save everyone the hassle and FORCE CLOSE all threads with >3 months of inactivity. | |
Re: and here's a variation that's even less elegant, but more simple, assuming you can use standard C libraries [code]#include <string.h> char longString[3000], splitString[100][30]; int stringLen, index; // "longString" is filled with a null-terminated string of chars stringLen = strlen(longString); index = 0; while (index*30 < stringLen) { strncpy(splitString[index], &longString[index*30], 30); … | |
Re: M (1000) is the largest roman numeral. Therefore, MMMDCCCLXXXVIII (3888) is the largest value that can be represented by roman numerals via standard rules. above that value, you can use a bar over a number to indicate multiples of 1000. for instance [b]IV[/b] with a bar over top of it … | |
Re: what are you talking about? drawings? in C? i mean, you can name and save any kind of file you want, whether if its a .bin or .txt or .bmp or whatever, but really, if you're drawing pictures using C, you should be well beyond asking "how do i save … | |
Re: [QUOTE]Dear colleagues I am currently working on _________ using [i]Borland C.[/i][/QUOTE] with all the solid professional compilers and dev environments out there -- many of them absolutely free -- why anyone, anywhere still uses this pile of non-standard crap of a compiler, is beyond me. it truly hurts my soul. … | |
she's not supposed to be gone so long. i miss getting beat up by her. :( | |
Re: ^ its presumptuous of you to tell him what his project needs or doesnt need. how do you know he's not building an array of IR detectors? ^^ if you want to connect with a commercial off-the-shelf IR sensor, its typically just three signal lines: RD (receive data), TD (transmit … | |
Re: mean old u.s. always hiding the goods from the rest of the world. you should meditate on over to the other side of the universe and bring back some super duper ubar technology. that'll show 'em. | |
Re: you've got a lot of issues. for instance, these lines: [CODE]mino - minn = 30; mino - minn = 60; mino - minn = 00;[/CODE] you can't make assignments like that. i'm having a really hard time following your logic, but you need to have the one variable being assigned … | |
Re: looking at the answers you have given to others [INDENT]-- "Shut down your PC for 30 minutes every 4 hours" -- "Save every 20 minutes when playing on-line games" -- "You could have a miss-match or RAM"[/INDENT] it's obvious that bob is right: you dont know what you're talking about. … | |
Re: i really want to help you, but your code is painful to look at. please repost it and enclose your code within [COLOR="Red"][noparse][code] [/code][/noparse][/COLOR] tags. always use good coding practice like proper indention of code blocks, and do not put line numbers in front of each line, it only serves … | |
Re: that video is awesome. i cant see it here at work, but i hope you linked the one with the cool musical score. i'm pretty certain he's not (just) drunk though. probably high on pure ether, or perhaps ketamine (special K) | |
Re: narue has already given you the answer. i'm not telling you anything she hasn't already. but maybe i can break it down for you into easy-to-chew bites. 1 -- create a new array. 2 -- start indexing existing array at the first element 3 -- if the existing element does … | |
Re: since no one has come out and said it, i guess i will: you should avoid using OS-specific libraries such as <conio.h>. this only works with (some) MSFT Windows systems. your code will never be portable using such libraries. but, if you dont care, then i guess i dont either. | |
Re: even better, IMO, is [URL="http://www.codeblocks.org/"]Code::Blocks[/URL] because, unlike Visual C++, CodeBlocks is already a full-featured IDE and debugger from the start, and won't try to get you to buy an upgrade for $$. | |
Re: you can't do this: [CODE]if (ch == *my_word ||*my_word2 || *my_word3)[/CODE] you have to specify what you're testing for each OR'ed condition. [CODE]if (ch == *my_word || ch == *my_word2 || ch == *my_word3)[/CODE] | |
Re: i don't know what you're talking about, and i'm certainly not going to email you anything. | |
Re: if you would like to get a meaningful response, please consider the following: [URL="http://support.microsoft.com/kb/555375"]How to Ask a Question[/URL] [URL="http://www.daniweb.com/forums/announcement118-3.html"]Please Use Code Tags[/URL] | |
Re: "fgets" is essentially a simplified version of "fread". "fgets" is good for (and should only be used for) reading character strings from an input stream, be it a file or the stdin device. "fread" is suited for any data type, such as binary (hex) data. it gives you more rope … |
The End.