958 Posted Topics
Re: Yes, there really is a need for standardization large data-types. Some of them can very greatly(like [icode]long double[/icode]) from compiler-to-compiler. Page 6. here: [url]http://www.agner.org/optimize/calling_conventions.pdf[/url] | |
Re: Get DOS and use Mode 13h, lol ;) You have to get the max console size, then use SetConsoleDisplayMode() edit: Actually I think you need WinXP for it, sorry. | |
Re: Just open the Windows directory and take your pick on what to use against it. Registries, .infs, replace .exes with .coms, find a minor glitch, etc. | |
Re: Can I see the part where you try to access the NumDays()? | |
Re: If you're going to include the C++ headers, why not use [icode]cin[/icode] and [icode]cout[/icode]? | |
Re: You didn't want to try out the Kelvin one I posted, too? Your functions should except parameters too: [code]double cubeit(double value) { return(value * value * value); }[/code] use it like: [code] double x; cin >> x; x = cubeit(x); cout << x << endl;[/code] | |
Re: That might explain how it's only at at 300, instead of 600. But it's all in the spam folder, so was never a major concern for me. | |
Re: First you're using the wrong "OR". For comparisons it's "||", not the bit-operation 'or' "|". | |
Re: Examples: [url]http://michael.dipperstein.com/huffman/index.html[/url] I was thinking of trying something like this out, but might make things complex. | |
Re: Just copy and paste into a string array. There is a very hacky, nested way of doing it: [code]#include <stdio.h> int main() { char text[] = { #include "text.txt" }; printf("%s\n", text); getchar(); return(0); }[/code] [code]text.txt: "text and stuff" [/code] | |
Re: You mean if you have a radius, circumference, etc. then solve it? [url]http://www.mathopenref.com/diameter.html[/url] | |
Re: Something useful to memorize, or atleast refer to: [url]http://www.asciitable.com/[/url] | |
Re: Whoa!!!! The whole question, and code is in a single byte! | |
Re: Can you be a little more specific in your problem with it? What about it is confusing you, or do you have code of your problem? | |
Re: You have the option of string.append(), for the end of a string; and string.insert() to insert characters at a known position, in a string. [code]string setpath = "set setpath=%path%;"; setpath.append(user); system(setpath.c_str());[/code] Or read The World of DOS - Creating Batch Files, that might help. | |
Re: Wouldn't output be [icode]print[/icode]?... | |
Re: There's a few on SourceForge; except some are still at just booting an image and displaying a small string, right now. | |
Re: So the project is something like a phone directory, or large database management project? Which if so, then look at something like MySQL. | |
Re: Use a loop that decreases its-self. [icode]for(int i = numNames; i > 0; i--)[/icode] | |
Re: I use to make functions, and converters for all my Chem. class stuff. from F to C: [icode]temperature = (temperature - 32.0f) / 1.8f;[/icode] from K to C: [icode]temperature = -273.15f + temperature;[/icode] edit: I figure you know [i]basic[/i] algebra to go from C to F, F to K, etc. | |
Re: I opened it and.... well - 38KB of code! You need to isolate your problem, and not just give a whole project to someone else, to track. This is also the C++ forum. | |
Re: A design like?: [code]print "Enter strings:\n" readstream "%s, %s", str1, str2 print "Enter integers:\n" readstream "%d, %d", &int1, &int2[/code] | |
Re: Try: [icode]vector<string> str;[/icode] The [] for string is overloaded, to mean other things. | |
Re: The installation of the current beta isn't as good as it should be, at the moment. You must uninstall all past versions, to be safe, you must use the default [icode]{drive}:\Dev-Cpp\[/icode](at least on the XP installations, I've noted), make sure it's not dir Dev-C++ like from the older versions; on … | |
Re: You put prototypes of the functions in the headers, then place the code in individual C/Cpp files that you add to the project(assuming you have an IDE) which are compiled as object files that get linked. This also saves massive amounts of time compiling large projects, in which you only … | |
Re: So horridly formatted, I get lost in all those brackets. | |
Re: [QUOTE=LincolnGurl;736380]TAs chip designers, not C++ programmers, we would normally construct these routines at ASM/uC level and thus have complete control over both implicit/explicit code generation. However, due to product restructuring, we must now produce native C/C++ "programmer-friendly" firmware which is readily accessible by designer and non-designer alike. As most of … | |
Re: It wasn't rude.... there is a Game Dev forum here too. Does your game engine have a GUI you can use, letting you progress to the rest of the code? | |
Re: cout not understood? Are you including the right headers? There's Code::Blocks, and Dev-C++ | |
Re: [QUOTE=fatnickc;387960]I know that I could convert to binary, breed & mutate, and then convert back to decimal[/QUOTE] The computer is always technically in bin... even if you're using dec values in a high-level language. | |
Re: Scan for input, and [icode]break;[/icode] when you get some. In the loop checking for input, set up a counter with clock() and check if it's been two or so seconds, in the loops condition. | |
Re: Sounds like homework.... Google is your friend. (just staring at the list of operators it might become obvious) | |
Re: You only need one loop, just use counters. Here's one on the site from a few years ago: [url]http://www.daniweb.com/forums/showthread.php?t=28093&highlight=fibonacci+c%2B%2B[/url] | |
Re: If you don't even need all that fancy stuff anyway, DX9. Maybe even try SDL or Allegro if you'd like even more OS cross-platform compatibility. | |
| |
Re: Do you have the code pasted twice? If it's your code, then shouldn't you know how to to add data to your nodes? And divide by eight groups? Like eight lines of input, or eight values in a single line? | |
Re: Does it have to be [icode]Matrix * Matrix::op[/icode], and [icode]Matrix &Matrix::op[/icode]? | |
Re: Here's code from something I was doing the other-night: [code]string str = "I'm a fairy! abc xyz ABC XYZ"; int casechanged = 0; cout << str; for(i = 0; i < str.length(); i++) { if(isUpper(str[i])) { str[i] = toLower(str[i]); casechanged = 1; } if(isLower(str[i]) && casechanged != 1) { str[i] … | |
| |
Re: Everything for using C-style strings is in string.h Here's a reference: [url]http://www.cplusplus.com/reference/clibrary/cstring/[/url] | |
Re: There was a problem here that might have the solution, for you: [url]http://www.daniweb.com/forums/thread156929.html[/url] | |
Re: You could have just bumped your post. And alongarray was just a substitute for your vector... did you read the link about vectors I posted?: [url]http://www.cplusplus.com/reference/stl/vector/[/url] | |
Re: If you need even larger numbers you might want to look at SSE: [url]http://www.tuleriit.ee/progs/rexample.php[/url] | |
Re: stdlib's atol() not atoi(). [code]int countlines; while(!inFile.eof()) { inFile.getline(temp, 100); alongarray[countlines] = atol(temp); countlines += 1; } [/code] Good enough. | |
Re: If you're going to use windows.h's Beep() instead of the old non-ANSI _beep(), you might as well use Window's GetKeyState(), or GetKeyboardState(). |
The End.