1,265 Posted Topics

Member Avatar for SpectateSwamp
Member Avatar for jephthah
0
160
Member Avatar for harshaldhote
Member Avatar for sivak

[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? .

Member Avatar for Aia
0
399
Member Avatar for Waffles_2411
Member Avatar for jephthah
0
166
Member Avatar for tasosa
Member Avatar for Ancient Dragon

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]??? .

Member Avatar for GrimJack
0
1K
Member Avatar for want_to_code

[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.

Member Avatar for Aia
0
174
Member Avatar for curly3top
Member Avatar for smeezekitty
0
154
Member Avatar for metal_butterfly

[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

Member Avatar for ajay.krish123
0
114
Member Avatar for Aelphaeis

[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....

Member Avatar for jephthah
0
91
Member Avatar for mj85

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.

Member Avatar for jephthah
1
97
Member Avatar for NicAx64
Member Avatar for Will Gresham
0
534
Member Avatar for Aelphaeis

[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. …

Member Avatar for Aelphaeis
0
400
Member Avatar for beanryu

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 …

Member Avatar for jephthah
0
126
Member Avatar for xgmx
Member Avatar for jephthah
0
141
Member Avatar for Kryptonitejugz

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 …

Member Avatar for jephthah
0
5K
Member Avatar for jephthah

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 …

Member Avatar for Narue
0
67
Member Avatar for sKiTzo

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.

Member Avatar for jephthah
0
169
Member Avatar for metal_butterfly

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 …

Member Avatar for jephthah
0
216
Member Avatar for pdrino

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 …

Member Avatar for Aia
1
2K
Member Avatar for VelcroMan

oh good lord [/[URL="http://www.forumammo.com/cpg/albums/userpics/10063/Fail-carl.jpg"]carlfacepalm[/URL]]

Member Avatar for ArkM
0
185
Member Avatar for drjay1627

[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 …

Member Avatar for drjay1627
0
81
Member Avatar for shirish_kal

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 …

Member Avatar for Ancient Dragon
0
117
Member Avatar for Guru Silva

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 …

Member Avatar for Guru Silva
0
510
Member Avatar for metal_butterfly

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 …

Member Avatar for metal_butterfly
0
108
Member Avatar for swetharvss

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) …

Member Avatar for jephthah
0
190
Member Avatar for wasge

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 …

Member Avatar for wasge
0
197
Member Avatar for metal_butterfly
Member Avatar for jephthah
0
147
Member Avatar for metal_butterfly

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.

Member Avatar for jephthah
0
123
Member Avatar for amegahed3

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 …

Member Avatar for jephthah
0
271
Member Avatar for markfisher

your function is very nice, but i have to ask, what's wrong with [CODE]memset(string,0,21);[/CODE]

Member Avatar for markfisher
0
119
Member Avatar for amegahed3
Member Avatar for jephthah
0
100
Member Avatar for metal_butterfly

^ 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.

Member Avatar for jephthah
0
92
Member Avatar for johny123

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.

Member Avatar for jephthah
0
5K
Member Avatar for vaibhour

eek :icon_eek: but yeah... i think i just answered a C pyramid question right here in this very forum, like 4 days ago. .

Member Avatar for vikas1
0
117
Member Avatar for LightSystem

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.

Member Avatar for jephthah
0
92
Member Avatar for kbkorlahalli
Member Avatar for hiraksarkardg
0
120
Member Avatar for mikedd

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?

Member Avatar for Salem
-1
163
Member Avatar for Achmat

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.

Member Avatar for jephthah
0
281
Member Avatar for marcosjp

i dont understand your question. you want to send the number of seconds? well.... the number of seconds of "what"?

Member Avatar for ArkM
0
243
Member Avatar for angelicxtc

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 …

Member Avatar for iamthwee
0
791
Member Avatar for knarffrank
Member Avatar for c_ytsui

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 // // …

Member Avatar for jephthah
0
172
Member Avatar for riahc3

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 …

Member Avatar for jephthah
0
138
Member Avatar for abhigame
Member Avatar for Isha20

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?

Member Avatar for jephthah
0
139
Member Avatar for the reaper

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 …

Member Avatar for the reaper
0
281
Member Avatar for francisprite

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 …

Member Avatar for onkar81
0
277
Member Avatar for chanderk
Member Avatar for Vandithar

i would personally do something like this: $match = "rna binding protein" @matchwords = split(/[ -]/,$match); $newmatch = join("[ -]",@matchwords); if ($_ =~ /$newmatch/i ) { blah blah blah }

Member Avatar for jephthah
0
269

The End.