5,237 Posted Topics
Re: This is the part where we sit around guessing which OS/Compiler you have, and whether or not you have admin privileges on the machine in question. Some windows, and all Unix/Linux operating systems have the concept of 'shutdown' to take a machine down in an orderly fashion, and the concept … | |
Re: [url]http://clusty.com/search?query=how+compilers+work&sourceid=Mozilla-search[/url] | |
Re: Did you think of that topic title [URL="http://www.daniweb.com/forums/thread92565.html"]all by yourself?[/URL] | |
Re: If you're not going to [URL="http://www.daniweb.com/forums/thread92283.html"]pay attention[/URL] to people who reply to your threads, or attempt any kind of discussion, then you're wasting your time here. You can't just dump your attempt (without code tags AGAIN I might add), and expect someone to just give you an answer. | |
Re: > What is the function of fflush(stdin)? It's [URL="http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1052863818&id=1043284351"]undefined[/URL] It's [URL="http://c-faq.com/stdio/stdinflush.html"]undefined[/URL] > What for the operator -> used? Do you have a book? It's used when you have a pointer to a struct, so rather than writing (*p).member, you can write p->member, presumably in a less error prone way. | |
Re: Or double your chances at annoying people by posting the same thing on many forums. [url]http://cboard.cprogramming.com/showthread.php?t=94384[/url] | |
Re: Use a [INLINECODE]std::string[/INLINECODE] to store both strings, if you want to compare them with == Otherwise, use [INLINECODE]strcmp()[/INLINECODE] declared in [INLINECODE]#include <cstring>[/INLINECODE] | |
Re: [url]http://catb.org/~esr/faqs/smart-questions.html#writewell[/url] I tend to ignore questions which repeat letters or punctuation unnecessarily. Throw in some unformatted code, and it's a winner. | |
Re: Do you know about for loops, and how to use them to index elements of an array? Try using a loop to print out each letter of the char array in turn. From there it's a small jump to counting specific letters. | |
Re: Perhaps begin with something simple, which declares the array and a function which just returns the sum of all the elements in the array. | |
Re: [URL="http://clusty.com/search?query=Software+Life+cycle+models&sourceid=Mozilla-search"]http://clusty.com/search?query=Software+Life+cycle+models&sourceid=Mozilla-search[/URL] | |
Re: Ever think about using the board search for this? It's not like you're the first ever person to ask this question or anything. | |
Re: I guess you need a 'do' loop or a 'while' loop. The opening brace on line 13 would seem to suggest that would be a good place to start. | |
Re: You're using = in your if statements where you should be using == | |
Re: It's the "Shortest Job First" and "Shortest Remaining Time First" scheduling problem which happens to appear from time to time (and has been answered already). No doubt Round Robin would get added in due course. > #define n 20 You also have a variable called n, so this won't work. … | |
Re: I've seen the former a time or two, but the top-level "mark all forums read" has always worked for me. Forums with sub-forums (like the lounge) seem to be more susceptible to this. | |
Re: Well the short answer to the problem is that you're trying to use a graphics API for a long-dead DOS compiler, and you're using something rather more up to date. What you do about it is rather more complicated however. For a start, there are many more graphic API's available … | |
Re: Use the function called exit(); As in[CODE]exit(0); exit(EXIT_SUCCESS); exit(EXIT_FAILURE);[/CODE] Or if you're in main(), you can use these values with the [INLINECODE]return [/INLINECODE]statement. | |
Re: Well you ignored [URL="http://www.daniweb.com/forums/announcement8-3.html"]this thread about using code tags[/URL] and the watermark at the back of the edit window. As a result, your code is an unformatted mess. ![]() | |
Re: Consider using a compiler with more warnings enabled. [code] gcc -W -Wall -ansi -pedantic -O2 foo.c foo.c: In function `main': foo.c:26: error: parse error before '/' token foo.c: In function `getOption': foo.c:62: warning: too many arguments for format foo.c: In function `main': foo.c:36: warning: statement with no effect foo.c:38: warning: … | |
Re: [url]http://www.googlelunarxprize.org/[/url] Well at least it satisfies the "hasn't been done before" | |
Re: Count how many bits you input. Use a loop to add more bits from that count to however many you need. | |
Re: [url]http://www.daniweb.com/forums/announcement118-2.html[/url] OK, so what have you managed to do so far, apart from dredge up old threads with a similar subject? | |
Re: Save the results of the rand() calls in separate variables. num1 = rand(); num2 = rand(); if ( guess == num1 * num2 ) | |
Re: OK, so which step of - read in "1000101" - seperate it into digits - and then assign that digit its decimal number is confusing you? | |
Re: I'm fine, but now my eyes are bleeding because you've yet again failed to grasp the concept of code tags, despite the watermark at the back of the edit window, and "how to" threads in bold writing at the top of every forum. | |
Re: You don't need to return anything, as changing the board inside the function will change the board in the caller. Arrays are always passed as a pointer, even if you don't use any pointer notation in the definition of the function parameters. | |
Re: Something like this? [code] if ( strcmp( argv[1], "--help" ) == 0 ) { showHelp(); } [/code] | |
Re: > printf("%d %d %d %d \n",v1,v2,v3,v4); Use %f for floats (and doubles), not %d | |
Re: void* specifically washes away any concept of type. Check("string"); Check(&myDouble); All mean the same thing. Are you trying to do something with the UNICODE in the win32 API ? | |
Re: > im new to C++ so maybe im missing some fundamentals or something. Like the fact that your program is a C program perhaps? Clarifying which language you're trying to learn would be a good idea, because if you attempt to use some mysterious C/C++ hybrid, it won't be a … | |
Re: > Axle: 2 cylinders and a rod > Dumbbell: two spheres and a rod > Spears: two cones and a rod First off, I would expect to see 4 functions along the lines of double calculateSphereVolume( double radius ); double calculateRodVolume( double radius, double length ); Each of your cases … | |
Re: > [INLINECODE]double Ratio(double* a, double** VA, int i)[/INLINECODE] Except that is no longer equivalent to [INLINECODE]double Ratio(double a[3], double VA[3][3], int i)[/INLINECODE] The function will still compile with a ** pointer, but how you call the function changes. To be the same as the OP's declaration, it would be [INLINECODE]double … | |
Re: What image format(s) are you required to deal with, JPG, BMP, PNG, others? > the image processing is to be done in borland C and using code composer > it shud be called to a dsp processor. OK, so some of the work is done on your PC, with code … | |
Re: For most of history, we observed the passing of seasons from the solstices and equinoxes. Now we just wait for the round robin question ;) | |
Re: Goto [url]http://www.rfc-editor.org/[/url] Look up the RFC which describes the Network Time Protocol. Read it to understand how to request a time and how to decode the answer. | |
Re: > Adding the new subdirectory to the Windows PATH doesn't seem to be doing the trick PATH is for executable files (and scripts IIRC) You need to make use of the -I and -L command line options for gcc Eg. [INLINECODE]gcc -I/path/to/headers -L/path/to/lib prog.c[/INLINECODE] If you're using some kind of … | |
Re: How did you manage to create a 500K ZIP file? Just post the code, in code-tags. We don't need all the other project crap which is of no use to anyone else who doesn't have your specific tools. | |
Re: Also posted on cprogramming.com. Just so you know, seeing the same post on multiple forums doesn't look good to a lot of people. ![]() | |
Re: alc6379 exclaimed on 3rd Nov 2004 (that's 3 YEARS AGO to you) Please stop bumping your thread. The people interested in your topic will find this discussion, and continue with it. You're being very inconsiderate to other posters with your behavior. | |
Re: Perhaps more meaningful variable names than a,b,c etc etc would make it easier to follow the code. Also, it's a good idea to get it working without all the gotoxy() stuff, which is non-portable. Sure it may go 00:00:10 00:00:09 00:00:08 down the screen, but until it does, all the … | |
Re: %d will treat a variety of similar types as all being int, including chars. When you << a char, that is exactly what you'll get, a char. If that happens to be a non-printable char, then your output file will appear funny. Try casting your chars to ints before outputting … | |
Re: [url]http://www.videolan.org/[/url] Grab the source code. > I was wondering if there's a way to play rm/rmvb files in a C application. Unless you're looking for something trivial like [INLINECODE]system( "nameofmediaplayer.exe nameofmediafile.rm" );[/INLINECODE] | |
Re: > open up internet windows a certain number of times, say 20X, > and then close them....then repeat, over and over So which is it, click-fraud or Denial of Service ? Or do you have a good reason for wanting to do this? | |
Re: Not content with posting the same thread TWICE on cprogramming.com, it's here as well. Breath in Breath out Relax. | |
Re: [URL="http://cboard.cprogramming.com/showthread.php?t=94087"]Recursion explained[/URL] | |
Re: The first question is, can you draw both shapes separately ? | |
Re: > please reply if I am mistaken You are mistaken. Read the link Aia posted. Trying to rationalise what you expect to happen, or merely posting what your current compiler gives you is no way to go. | |
Re: The usual problem is trying to mix say cin >> somevar; with getline(). They don't play well together, since a simple cin will leave a newline on the input stream, and this is exactly what getline stops at (thus giving the illusion of it being skipped). Exactly how to get … | |
Re: Well it's a start. You clearly understand the concept of "repetition", and that's one of the skills you will need to master the for loops necessary to complete your task. |
The End.