1,265 Posted Topics
| |
Re: ^ WTF did you just say? :confused: | |
Re: [URL="http://www.xb360ox.com/files/3wp0mxy9lbh5yal560i0.jpg"]sup dawg [/URL]i herd you like to read, so we put some files in your files so you can read while you read .... naw serosly, what are you saying?? are you saying you want to read the last LINE from your file? is that it? . | |
Re: ^ his question is totally valid here. you, on the other hand, are not. | |
Re: Oh, look.... a Creation vs. Evolution internet smackdown where technologically-minded evolutionists gang up on a few bold (if slightly misguided) proponents of ID/creation science ... and it immediately jumps to 12+ pages in just over a month? [I]has this ever happened before[/I]??? . | |
Re: [QUOTE=nucleon;843880]I find it useful on occasion to place a prototype in a function. [/QUOTE] for what reasons, and in what context? please elaborate. | |
Re: [QUOTE=syarolazuan;843522]can someone give me this programming code?[/QUOTE] no. | |
Re: [QUOTE]Can someone give me the code for this???[/QUOTE] come on, man, you've been here long enough now to know better than that | |
Re: [QUOTE]Until you translate that to C we can't move any further with that code.[/QUOTE] why, exactly, are we reinventing the wheel? i'm trying to locate my motivation for "moving further", and not having much luck.... | |
Re: i believe you will want to call the maqr() function after you've allocated the memory sizes. also, remember to always use "free" after you're done with the allocated arrays. | |
Re: i sort of misread the title and thought that you were going to tell us about your erotic fantasies. | |
Re: [QUOTE=nucleon;841865][icode]conio.h[/icode] (if available to you) has the function [icode]_getch()[/icode] which is unbuffered and does not echo the character read.[/QUOTE] i wish i could give you half a cookie, for your halfassed solution. sure you can write a program with conio.h, but it will be broken on most every non-microsoft systems. … | |
Re: no you can't do that. because the BOOL could be defined as value zero. or seventyelevenbillion. or, worse yet, BOOL could not be defined at all. then what would happen to your conditional evaluation??? so, i believe the thing you're looking for is the preprocessor directive, "#ifdef"... use it like … | |
Re: he only had 36 posts, but somehow i feel as if he will be missed. | |
Re: the short answer is: you can't. the long answer is: you can, but only if all fields are consistently the same width, and there's never any variations in the numbers of fields or their sizes. in which case, a solution can be where you'll use "fopen" to read, "fgets" to … | |
some people think section 11.1 of the Google Docs TOS is the harbinger of the End of Days. other people say that's just mostly-meaningless legalese for Google to cover their own arses. then the first group says that the second group has drank the Mountain View kool-aid. the second group … | |
Re: software testing is an easy area to get into. not something you'd want to do long term, necessarily, but one you can def. work your way up from. | |
Re: if you use [code=c] it will highlight your C syntax and make it vaguely readable. and if if you also used whitespace to properly indent your code blocks, then we could really read it. as it sits right now, it just gives me a headache to look at it. since … | |
Re: instead of using malloc() (or realloc) poorly.... might i suggest sticking with the tried and true: [code]char stringblock[MAX_NUM_LINES][MAX_LINE_LEN];[/code] because i'm fairly certain you're not doing an embedded application that is limited for RAM. but mangling malloc() like you're doing will certainly find the limits of your computer memory after you … | |
Re: oh good lord [/[URL="http://www.forumammo.com/cpg/albums/userpics/10063/Fail-carl.jpg"]carlfacepalm[/URL]] | |
Re: [QUOTE=drjay1627;838009]I did a project a while back and as the grading TA insist on it compiling on Solaris. I have a 0 for a perfectly working project.[/quote] its not working if it won't compile [quote]This was a project for a networking class. The project wanted us to establish a TCP … | |
Re: how about you take a look at the basics of calendar time functions in the time.h library, take a stab at it yourself, and then come back and ask specific questions. [url]http://www.gnu.org/software/libtool/manual/libc/Calendar-Time.html#Calendar-Time[/url] because people here will generally NOT do your work for you. as you already found out in your … | |
Re: this particular EBUSY error was the subject of some bug fixes in GCC a few years ago. are you using an older version of GCC that might still have this bug? seems unlikely, but.... anyhow, not trying to blow you off, but since this is not standard C and it … | |
Re: first off, theresabsolutely no reason to use MALLOC() here, all youre doing is adding more confusion. secondly, if you do use MALLOC(), then you need a corresponding FREE() . the fact that youre not using either FREE() or REALLOC() tells me that you dont know what you're doing, and should … | |
Re: this snippet does no error checking, and is full of assumptions, but I'm posting it here so you get an idea of how strtok() could work. [code=c]//get subsequent lines into a char buffer while (fgets(line,MAX_LINE_LEN,file_ptr)) { // tokenize the first item by comma delimiter line_ptr = strtok(line,","); while(line_ptr != NULL) … | |
Re: your problems are so widespread and fundamental, it's not reasonable for me to even try and debug it. this is not a simple fix. to be blunt, you are attempting to take on too complex of a project (for your skill level) at one time. theres no way to help … | |
Re: hey dude, i want you to quit posting the same question in repeated threads. what is this, the third one now? | |
Re: please stop double posting your question. you will not get twice the number of answers. you will, in all likelihood, get fewer answers because people find double posters to be annoying. | |
Re: i try to avoid fscanf() because this function requires the input to be very precisely defined, and will cause you much headaches if your input (i.e., the files) ever vary from what you expect them to contain use instead "fgets" to read each line, and something like "strstr" or similar … | |
Re: your function is very nice, but i have to ask, what's wrong with [CODE]memset(string,0,21);[/CODE] | |
Re: ^ egads. you just walled off 25K of memory for ... what? | |
Re: ^ BEEJ's is a classic guide. read that, and you'll learn everything you need. try the examples, and come back if you get stuck. | |
Re: timestamp your logs by date (or week, month, etc.) then you can delete the old ones at your leisure. you can keep the most current log name without a timestamp if you like, then before creating a new one the next day (or week, month, etc.) just rename it. | |
Re: eek :icon_eek: but yeah... i think i just answered a C pyramid question right here in this very forum, like 4 days ago. . | |
Re: you cant "fflush" an input buffer. the best thing to do is not use "scanf", but instead use "gets", and parse the entire string for everything that's entered, whether it's valid or garbage or a mixture of both. | |
Re: i see nothing much has changed since ive been gone. | |
Re: sure, sure. i've got nothing better to do than do your homework. shall i also write your report, bind it, and mail it first class to your instructor? | |
Re: i thought this thread was about "strangling newbies" imagine my dismay when i found a ten-mile long post full of incoherent code with no syntax coloring. | |
Re: i dont understand your question. you want to send the number of seconds? well.... the number of seconds of "what"? | |
Re: in the future, dont make duplicate threads for the same problem. please go and close your other thread with the same title. I'm using the free MSVC compiler, and im not getting any runtime errors... it compiled and ran without any issues. of course it is incomplete and does not … ![]() | |
Re: check this out. compile it and run it and see how it works. the function "stripCharacters" will strip out any undesired characters using the standard library function [b]strtok[/b]... very powerful function, learn to use it. [code=c]#include <stdio.h> #include <string.h> #define MAXLEN 32 ////////////////////////////////////////////////////// // // function : stripCharacters // // … | |
Re: every time i see this title [b]Making War[/b] in the list, i think of that segment from the movie "Clerks" ... you know, the Russian metal head dude who sings his "Berserker" song for Dante's girlfriend after Jay and Silent Bob encourage him: [quote]My love for you is like a … | |
Re: it looks to me like you're supposed to create a header file according to a specific format (partially described above) based on attributes of the binary or hex file in question. is that right? | |
Re: wait a minute... are you trying to open a *website* or are you trying to open a harddrive through Internet Explorer if youre talking about a website.... then you'll need to be getting quite familiar with either the winsock.h or sockets.h library, depending on your OS. if you're talking about … | |
Re: here's something fun to do: create a program that encrypts/decrypts messages by hiding/extracting them from a JPG image. I'm not talking about just "hiding messages" in the exif header, which would be easily detected by any network sniffer. I mean actually changing a relatively small percentage of the bytes to … | |
![]() | |
Re: i would personally do something like this: $match = "rna binding protein" @matchwords = split(/[ -]/,$match); $newmatch = join("[ -]",@matchwords); if ($_ =~ /$newmatch/i ) { blah blah blah } |
The End.