1,265 Posted Topics
Re: you can certainly password-protect files -- and even entire directories.... the easiest way is called "setting permissions" on *nix and windows has an equivalent, and the password protection is your account login. of course if you share an account the issue is moot. you also have no protection against the … | |
Re: you can probably do it with scanf() in a complex and obscure and difficult-to-understand manner. i don't know how. but i do know how to do it with fgets() and atoi() in a simple, straightforward and easily-understood maner.. | |
Re: dude, this is really freakin easy. 360 degrees in a circle. 60 minutes in a circle 6 degrees per minute 1 degree per 10 seconds 0.1 degree per second. you can have 10 second resolution and only use integers. if you need 1 second resolution, you're still only in tenths … | |
Re: we're not going to fix your code for you dude. you're going to do that yourself. (1) keep track of each number pair you generate by setting the appropriate element in a 10x10 array. (2) each time you generate a new pair, check and see if your 10x10 array has … | |
Re: i'm curious what cities you visited. america is a diverse place, i think you may have been in a relatively conservative area of whatever city you went to. For example, i live in the city of Seattle. i would contradict some of your observations with anecdotes of my daily life. … | |
Re: if you can guarantee non-repetition, then your numbers aren't random. | |
Re: best C socket programming reference ever: [url]http://beej.us/guide/bgnet/output/html/multipage/index.html[/url] many books are good... so, why is this best? because unlike the other good ones, this one is also free. | |
Re: [QUOTE=idlackage;1197176]The number I'm looking for is valid when it's positive, and nine digits. I used ( (value >= 100000000) && (value <= 999999999) ) first, which worked okay, but did not account for leading zeroes. How do I validate a nine digit number, using only math and no functions, with … | |
Re: [QUOTE=mariosbikos;1198163]are u sure?i mean what is dim2size and why isn't there dim1size??also my array includes only characters inside...can u transform my code so that the function will return the array?[/QUOTE] well have you tried it?? look: [code]void sin1(char map[][MAX_COLS])[/code] make your prototype and your definition like this. you only have … | |
Re: for one thing, you're finding a minimum value so call the variable "min" or something. not "max" remember how when you found max, you started at the lowest possible value and worked up. you set[iCODE] max = 0[/iCODE] and changed it any time the current value was found to be … | |
Re: i fail to see how your refusal to pay attention in class and/or read the material somehow translates into an urgent need for me to do your schoolwork. | |
Re: [QUOTE=ana12;1175148]for all daniweb here hows your day today are you ok or not?[/QUOTE] no i'm not ok. what should i do? | |
![]() | Re: line 4 *ptr2Data = (unsigned long) SomeArrayOfData[4]; ![]() |
Re: first off, get rid of "Fast Learner, Good Listener, Self Starter, Self-Motivated". that is all bullshit. every student in the world puts that crap up, and it means zilch other than to waste space. the two jobs you had at school dont belong under education, they belong under jobs. if … | |
Re: well, you don't have a return value. but i dont know if that's the source of your error code. i don't use Dev C++ so I can't say. I use CodeBlocks (w/ MinGW on windows) or gcc (on linux). I do recommend CodeBlocks, because it's my preference. I've heard criticisms … | |
Re: i think a peer review is absolutely necessary for tutorials. i mean, just look at the sad state of "code snippets"... there's some horrible, non-working stuff in there. if i didn't know this site, and i came across some of those snippets, i would be inclined to think they were … ![]() | |
Re: thank you for dropping your load of crap in a 5 year old thread that was already resolved and put to bed. The next time you wish to drop another load, let me suggest that you start a new thread all on your own. That way you won't soil someone … | |
Re: your variables.c file should NOT have a "main()" function. your variables.c file should have ONLY the implementation of the three functions prototyped in variables.h. the two files, variables.c and variables.h are a pair. the .h declares the prototypes, the .c defines the implementation. you may not be used to seeing … | |
Re: [QUOTE=jgehlot09;1197235]But... the compiler return always zero.[/QUOTE] the compiler is not returning zero. the compiler is what builds your code into a binary executable after linking the appropriate functions from teh standard libraries. the binary (program) is thing that, during runtime, returns your values of zero or otherwise. so, you know, … | |
![]() | Re: if there's a thread that needs bumping, it's this one. [B][COLOR="Red"]Keep[/COLOR] Hope [COLOR="Green"]Alive![/COLOR][/B] ![]() |
Re: [QUOTE][B]Title: Strange bug with gets()[/B] [/QUOTE] Answer: the "gets" function[B] *IS*[/B] a bug. kill it before it breeds. | |
Re: [URL="http://www.cplusplus.com/reference/clibrary/ctime/"]How to use time.h functions?[/URL] all you need to know is there | |
i know this is about MySQL, but there is no 4GL forum, so i'm hoping one of you experts might know: we have an application that uses Progress (on a unix system) that imports data from .csv files and writes the various fields to the database. one particular type of … | |
Re: [QUOTE=jonsca;1193270]Line 22 should be [icode] rad = input*pi/180; [/icode] (since pi rad = 180 degrees) (also cos(2*pi) = 1 not 2)[/quote] pi / 180 is what you'd use if you were making the conversion from degrees. i don't think he is doing that, his input is just in radians, actually … | |
Re: [QUOTE=WaltP;1195715]I have a fleet of cars -- it's a Ford. I have a pride of lions -- his name is Leo[/QUOTE] [url]http://icanhascheezburger.files.wordpress.com/2007/05/jesus_christ_its_a_lion.jpg[/url] | |
Re: Hi. first a comment, then the answer: the reason why it took 14 hours for someone to reply, is that your code is nearly unreadable. yes, you used code blocks and yes you used indentations, and that's a great start. thank you. but your lack of a consistent style of … | |
Re: [QUOTE=Famous16;1177434] I want to buy purchase Dell laptop online. Can anyone tell me the reliable and recommended shop or online resource where I can buy laptop online. Need for help.[/QUOTE] why dont you click your spam link? sure you'll find one there. . | |
Re: yeah, i hear ya, but youre gonna have to pony up some of your own code first. since you're not there yet, you might want to take a look at [URL="http://beej.us/guide/bgnet/output/html/multipage/index.html"]Beej's Guide[/URL] ... it is a great reference, full of valuable and relevant examples. | |
man,[URL="http://jasonbstanding.com/blogparts/2009/09/bleeding.jpg"] i hate it[/URL]. | |
Re: dude, that's WAY too much code to look at. but it's nicely formatted and commented. so thanks for that. i'll try and give it a once over, but in the meantime, you should really learn to use fgets() inconjunction with strtol() to get your input. using scanf() [I]can [/I]do it … | |
Re: Ctrl z is not a C function. IOW, the interpretation of ctrl-z is system dependent, and is not necessarily EOF. For example, on unix, ctrl-d is used as EOF. On systems where ctrl-z is used, it still doesn't always get interpreted as eof, as you have seen for microsoft OS, … | |
Re: please repost your most current code. please use code tags and indentation. thanks. | |
![]() | Re: one problem is your function, palindrome, expects two integers to be passed into it. you've declared these integers in main as 'i' and 'k' but you don't assign any value to them before passing them into the call to palindrome. therefore, they will either be zero or some large value … |
Re: no it's not. it's terrible. it's ugly. and it's unportable. it wont even compile on a standard C compiler. i doubt it even works. | |
Re: build menu settings is now "expert" ? :-O . | |
Re: to try and clarify, by adding the value of 'A' (0x41) to any byte that has a value less than the space ' ' (0x20) character, and printing the resulting char appended to a caret '^', the ascii values will be printed like so [CODE=text] value disp ----- ---- 0x00 … | |
Re: interesting question. i believe this is a proper LCG. At least i can't say that it isn't. I don't fully understand how, but it looks like he's using shifts to perform modulus operation. [URL="http://en.wikipedia.org/wiki/Linear_congruential_generator#LCGs_in_common_use"]see here[/URL]. im interested to know the details if you find out. | |
Re: Welcome Jim! quite an impressive resume. glad to have you here. help is what we do. :) | |
Re: this is probably the most interesting Community introductions thread i've seen yet. | |
Re: here's a simple answer: a "hash function" takes a string of an arbitrary and probably variable length (called the [I]key[/I]) , and transforms it into a single integer (called the [I]hash value[/I]) which is a smaller, fixed width value. hash functions are widely used in cryptography and database management, for … | |
Re: rule #1: don't give away homework answers rule #2: when giving away homework answers, at least use code tags rule #3: see rule #1 | |
Re: i swear, this guy. i should probably be more tolerant, but his umpteen threads repeating the same problem, with the same variation on URGENT PLS HELP NOW headlines, along with his imperiously demanding tone. it's just making it really difficult to care. . | |
Re: these functions will be your friends: fopen() strstr() strcpy() fclose() [URL="http://www.cplusplus.com/reference/clibrary/"]look 'em up.[/URL] | |
Re: [quote]The only way that I am able to do well in programming is because I am sort of a hard worker. ... I like routines and do menial tasks very well[/QUOTE] sounds like a career in databases is for you. [QUOTE]I am really not that smart.[/quote] then it will be … ![]() | |
Re: wait wait, let me get this right. you just posted your homework program requirements and dumped a shitton of code, and said "Urgent" and "Please help me finish this" yeah.... I don't think so. see, the way it works around here is you need to formulate a specific question about … | |
Re: well, here's my stripped down version :) [CODE]#include <stdlib.h> #include <stdio.h> int main(int argc, char **argv) { int i, days_In_Month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31} ; char *month[12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"} ; for (i = 0; i < 12; i++) printf("%s has … | |
Re: no loops, no library functions, no pointers, no recursion ... well, i don't know what else is left. you've got to use [I]something[/I] |
The End.