1,265 Posted Topics
Re: [QUOTE=Salem;880345]> I know the Simpsons is a bad example as they've been on our screens for over 10 years and don't seemed to have aged at all! Check with [URL="http://www.snpp.com/guides/lisa-3.html#3.1.3"]LISA (List of Inquiries and Substantive Answers)[/URL][/QUOTE] For Better or Worse? | |
Re: [icode]genlib.h[/icode] ... [icode]simpio.h[/icode] ... [icode]strlib.h[/icode] ... [b]WTF is this???[/b] whoever told you to use this crap is setting you up for FAIL. this is so non-standard, i dont even know what the hell it is. all i know is that it's caused your code to be so far beyond broken … | |
Re: the memory at the address pointed to by 'p' has been [B]assigned[/B] the values shown. therefore, you can print the null terminated string as you might expect. but the memory has not been [B]allocated[/B], so if you try to modify it the resulting behaviour is undefined. at least that's how … | |
Re: ii dont know anyone who still uses the news mailer to access USENET. that's like last decade. USENET's been on the web for some time now. | |
Re: quick note: you've already declared 'A' as type [icode]double *[/icode] ... so don't declare the type a second time when you allocate the memory otherwise you're passing the pointer as declared correctly, but you may want to reconsider how you define the array to begin with. | |
Re: for one thing, you're not reading and writing to your numerically sequenced files 'ifile' and 'ofile' like it appears that you think you are doing. change it to the following [code=c] sprintf(ifile,"C:\\Document\\file%04d.dat",i); sprintf(ofile,"C:\\Document\\o_file%04d.dat",i); in = fopen(ifile,"rb"); out = fopen(ofile,"wb");[/code] and you'll have to make the file name character arrays larger. … | |
suppose there were another planet similar to earth in composition, temperature, and atmosphere. (and given the bazillions of stars in the universe, the probability is quite high that, somewhere, there must be) so, considering another earth-like planet with H2O, carbon, and oxygen... over a couple billion years ... what kind … | |
Re: i'm going to use my [b]Psychic Powers[/b] on this problem. Monseiur Jephthah presciently knows that you need to change all of your conditional statements such as [icode]if(color ==1)[/icode] ... to the following: [icode]if(color [COLOR="Red"][B]&[/B][/COLOR]=1)[/icode] ... and do NOT, as the post #5 suggest, use "else if" statements. if my [b]Psychic … | |
Re: you dont need to recalculate each and every factorial. because if you've already calculated 9! (for example), then 10! is really just 9! * 10. and basically it's this: you can't do integer division. because all your quotients will be integer zeros. 3/6 = 0. 4/24 = 0. 5/120 = … | |
Re: this code is a mess. first off, you would need to change the line [icode]scanf("%f",&a);[/icode] to [icode]scanf("%f",&a[i]);[/icode] if you wanted to have any hope of collecting the input into the array. but you cant just declare a float pointer like you're doing, within the 'save_array' function, and expect memory to … | |
Re: sure would be nice if you used syntax highlighting, so it would keep the whitespace/indentations, then i could read the code. otherwise, im not in a position now to compile it so i can't (won't) do much else. [noparse][code=cpp] //enter your tabbed/indented c++ code here [/code][/noparse] . | |
Re: perl is (or at least was) a very good language to know. some people would say that it's a dying language and is being replaced by Python. one of those two would be worth your time. i'd say to hell with PHP, though. everyone and their brother knows PHP. anyone … | |
Re: use the additive property: (a * m) + (a * n) = a * (m + n) example: [code=cpp]result = (a << 2) + (a << 4); // result now contains the sum, 4a + 16a = 20a cout << a << " times 20 = " << result << … | |
Re: i think he means [code=c]unsigned long MAGIC_NUM = 0xDEADBEEF;[/code] | |
Re: [QUOTE=articlemaster9;879657]c is generally slow compared to other programming language.[/quote] wrong. C is generally faster compared to other languages. any compiled language is inherently faster than an interpreted language such as Visual Basic or Java. [quote]nothing is coming in my mind right now.[/QUOTE] :icon_rolleyes: | |
Re: div_t is struct for the result of divide operation, puts the quotient and the remainder into the structure. it is being used here to convert a numeric value into an ascii string according to the base number system desired. example: "itoa" convert value 1247 to be expressed as base-16 ascii … | |
Re: your problem is here: [icode]for(i=0;arr[i]<=3;i++)[/icode] your index is 'i' yet your conditional is based on the value of 'arr' at the index 'i' fix that. . | |
Re: The [URL="http://gmplib.org/"]GNU MP Big Number Library (gmplib)[/URL] is an industry standard solution for large number cryptography. | |
Re: are you trying to get help? then you should start a new thread, and remember to ask a specific question if you hope to get a specific answer. | |
Re: just because i have no comment on this matter, shouldn't stop me from commenting. | |
Re: no, you need to give US code... as in, the code you're trying to use, so we can see why it's not working. but since you say it's transmitting properly, the first thing I would do is verify the hardware is connected correctly and is working as it should. put … | |
Re: [code]main()[/code] what the hell is that? main must be an int, and it must take an argument [code=c]int main(void)[/code] other than that, i dont understand what your question is. i'm still not sure if you even asked a question. let me take a guess... is your question: "why doesn't this … | |
Re: most of my experience is in manufacturing. i second AD's comment about being the "most interesting". we get to write programs that directly control hardware and physical equipment such as automation and robotics.... sometimes very heavy duty stuff like cranes and motor drives, sometimes very precise measurement and assembly equipment. … | |
Re: sorry, it doesn't work like that here.... espeically considering you're using a non-standard library. you're going to have to post your code so we can replicate your failure, then maybe someone can diagnose why you're having a fault. | |
Re: [QUOTE=tux4life;875921]Or do you know the 'ultimate' way?[/QUOTE] i know the ultimate way [code=c] #include<jephthah.h> newStr_ptr = removeSpacesAndCondense(myString);[/code] it's non-standard and not very portable, but hey, it works on my machine. | |
Re: what they ^, ^^ said above. but just to add some background information to put it in context for you: the 's' in "srand" the stands for "seed"... meaning you have to first "seed" the randomization function before you can start generating random numbers. this has to do with the … | |
Re: goats are awesome. they can just clear right through thorny blackberry bushes in no time. dandelions are gone, too. they're a really popular alternative even in the city. here in seattle, we have some neighbors who have goats and rent them out. | |
rocked. but, as a relatively-new parent, i realize they give these movies a PG-13 rating for a reason.... the reason being that it's not really appropriate viewing material for four-year-olds. oh, well, he shouldn't suffer permanent scars. much. | |
Re: [QUOTE=winrawr;873648]I'm super proud Woo![/QUOTE] w00t! attaboy. | |
Re: [QUOTE]If you will give me permission, I will send my pseudocode to you in a private message. This will prevent cheating from other students.[/QUOTE] We're not your personal tutor. We help everyone here equally, as long as they appear to be honestly trying and not just bums looking for handouts … | |
Re: yeah, seriously. if you're gonna troll, at least be clever. this racist/linguistic spoof is beyond tired out and overplayed. | |
Re: [QUOTE=polo_coins;873199]Does anyone made such thing . I must make it for may classwork but I would rather copy someone else's solution and turn that in as my own work. I believe my instructors are too stupid to recognize plagiarism, so please just send me your codes[/QUOTE] pathetic | |
im going to risk getting a beating, because this is something i should (used to?) know... anyhoo, given a function, how do you tell the size of the array that is passed? obviously trying to find the sizeof the pointer doesn't work (it returns the size of the pointer, duh) … | |
Re: [QUOTE=sanushks;873446]So can sprintf be used to copy the array contents to a integer variable? Or is there any other function i can use to accomplish this?[/QUOTE] i prefer to use "strtol()" to allow error checking that doesnt confuse failed conversion with a valid zero (0) conversion. [code=c]#include <stdio.h> #include <string.h> … | |
Re: i have difficulties understanding your question. | |
Re: I think people should always buy local, when possible. and with open source projects, you may be able to get most of what you need [URL="http://opencv.willowgarage.com/"]online[/URL] . | |
Re: if this is a life-threatening emergency, you need to get off the computer and dial 9-1-1, or your local police or rescue department. . | |
Re: rapidshare is probably the worst possible place to "host" a document. post your questions here, and we'll look at it. | |
so im working in an environment (National Instruments) that auto-generates header files for the GUI. in my GUI, i have 150-some odd LEDs arranged in a matrix to represent a large relay bank. my LEDs are named and sequenced numerically like [code]PANEL_LED_1 PANEL_LED_2 ... PANEL_LED_150 etc...[/code] which would allow me … | |
Re: EDIT: never mind, this has been moved to a new thread. . | |
Re: for one thing, you dont "free" a pointer. you free previously allocated memory space. that you're talking about freeing a pointer, makes me suspect you didn't allocate the memory in the first place. of course it's all speculation at this point, since you haven't posted any code for us to … | |
Re: maybe i'm missing something, but UDP doesn't care what IP address is in the pseudo-header. it's a multicast protocol. anyone on the network can see and process the datagrams if they desire to do so. | |
Re: ORG declares the starting address where the code will be located in memory. | |
|
The End.