958 Posted Topics
Re: 66% Stupid questions, no references to Oden, Trolls, self-mutilated aliens, the psychology of an abomination after sitting in a psychward, or what would happen if one soloed Lydian Diminished into a Locrian in front of a child. | |
Re: I might have them, but: [quote]Collection of ciphers - $10,000 User license[s] - $200 per user Using a search engine - Priceless[/quote] | |
Re: What does your book say about pass parameters, and altering them? | |
Re: What compiler? I usually get a more detailed error than that. | |
Re: What's the output of temp before you use the function? Any code to see how you're going about that? | |
Re: [QUOTE=LucyB;787779]Seems the quality of answers isn't too great at the moment? Perhaps a diagram or a link to one for us newbies?[/QUOTE] The quality of answers goes up as the quality of the question goes up. Generally requiring a full paragraph. | |
Re: Maybe as a DLL? But - what's so "secret and special" about your code, are you embarrassed by it? Even if you put your code in a DLL, make sure it's abstract enough for the user. Since no-one wants to route through several layers of classes, declaring objects to be … | |
Re: Why are you recursively looping a function like that? It's hard to follow. Also not sure why you're not using `int main()`, globals in that way, string.h, or idk this is way more complex than it needs to be... | |
Re: Major violations of the CODE TAG rule, that's the problem here. | |
Re: I would suggest getting a compiler from this century, then reading up on ifstream. | |
Re: You mean like the keyword static, to keep it from external linkage; or volatile to keep the compiler from messing with it? I'm thinking you're meaning static. | |
Re: Explain what you believe that code does, and what you want it to do. | |
Re: [URL="http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx"]All here.[/URL] Just scroll to the end and read the table of requirements. | |
Re: Read the rules, CODE TAGS. Do you know about loops, like: [code]int array[10]; /*populate*/ for(int i = 0; i < 10; i++) avrg += array[i]; arvrg /= 10;[/code] That code assumes everything is always ten. | |
| |
Re: How about: [code]vector<string> blah; string temp; for(int i = 0; i < 52; i++) { some_random_string_generating_function(temp); blah.push_back(temp); } cout << blah[23] << endl;[/code] | |
Re: When you uninstalled it, you removed the leftover file? You're using the current version? Installed it to the default directory? I tested it on two XP machines, and it would only work in the default, but fine in other directories on other OSes. If you already tried that, perhaps update … | |
Re: Arrays have to be constant. Try vector<int>, or allocate the memory and delete it at the end. [code]int *an_array; /*input*/ an_array = new int [numb]; /*stuff*/ delete [] an_array;[/code] | |
Re: You really should go with a summary loop. [code]int num[10], sum = 0; ... for(int i = 0; i < 10; i++) if(num[i] > 0) sum += num[i]; cout << "Sum: " << sum;[/code] Try the same for input. If a number is negative, shouldn't you find [icode]|num[i]|[/icode], for each … | |
Re: "I need my insulin!" lol Or 'drug' em, instead. | |
Re: Optimizing Software in C++ [url]http://www.agner.org/optimize/optimizing_cpp.pdf[/url] Agner has a few other manuals, on his site too. | |
Re: Since we always now this is a square, you only need to allocate once. [url]http://www.parashift.com/c++-faq-lite/freestore-mgmt.html#faq-16.16[/url] Make sure you use the trys and catches, too. | |
Re: [QUOTE=1bennyd;781622]"10 letters and 10 numbers" - that's going to be a huge amount of combinations to sort through.[/QUOTE] 20![icode]2,432,902,008,176,640,000[/icode] First Google link of, "C++ Permutations" [url]http://www.bearcave.com/random_hacks/permute.html[/url] There seems to be plenty of permutation algorithms swimming around online. | |
Re: You compile and link .cpp files, not include it like a header. Two, repost with the indented version in CODE TAGS, so people can read it. | |
Re: Have you tried a modulo operation? | |
Re: Try this link: [url]http://www.cplusplus.com/doc/tutorial/dynamic.html[/url] Then read all of the other tutorials, refer to their references or try Google. | |
Re: [quote]Your home planet is: Glark Glark is a round, red planet roughly 25 million light years from Earth. It's covered in shrubbery and cocoa bean plants (so they make loads of choccie there) The inhabitants of Glark usually have quite short hair so they don't get it caught in the … | |
Re: If you're so new, then why are you trying a text editor? Why not learn the basics first, or just Google one. | |
Re: Why are you are you useing a C-string(const char *) for p? Actually this is a tad "weird," and over complicated(IMO). | |
Re: That was banned? Suppose that's why I never see anymore. | |
| |
Re: uhhmmm.... sentence is a single char. [icode]void func(sting &str) { bool alpha = true; getline(cin, str); while(alpha) { /*code*/ } }[/icode] | |
Re: @nitu: Do you know how to use any other bit-operators? @ajay: I believe you mean, computer. Regs are for brief usage, not storage. | |
Re: When a compiler says, "Missing/Expected semicolon/operator before whatever", is really an euphemism for the vague meme, "You're doing it wrong!"(not to be rude) You're missing the std namespace. [icode]std::cout << endl;[/icode], or after including your templates and classes, [icode]using namespace std;[/icode] which means you wouldn't have to use [icode]std::cout[/icode]. edit: … | |
Re: First result from using Google, "C++ Permutations". [url]http://www.bearcave.com/random_hacks/permute.html[/url] | |
Re: More books on varied programming subjects, and just general practice apps. | |
![]() | |
Re: Here's the number one problem, the format! A generic skeleton: [code]#include <iostream> #include <cstdlib> int main() { string input; int results[2], operation; bool continue = true; srand(time(NULL)); while(continue) { getline(cin, input); /*do stuff*/ if(comparison is right) cout << "Correct."; else { /*Ask*/ } } return(0); }[/code] Lets review. One: Variable … | |
Re: Windows API, [url]http://msdn.microsoft.com/en-us/library/aa446854(VS.85).aspx[/url], or? | |
Re: Was this as an insult to you, or do they believe you have the skills? | |
Re: No. No-one will write code for you, unless you're their respectable employer, teacher, or project partner. First function is missing a semicolon. Why do you declare and define another function inside of a function? Why not use a container if you don't know how to use an array? Why are … | |
Re: Except I doubt his authority, due to lack of English skills. And receiving an IP from admin; why should you be given that, Ron? ![]() | |
Re: There is no <vector.h>, just <vector> which includes all correct template headers in the bits directory. Did you install Code::Blocks right, and setup up the default compiler? | |
Re: [url]http://www.relisoft.com/win32/index.htm[/url] Create a window, draw a graph. | |
Re: Did you check limits.h? |
The End.