Forum: C++ Sep 24th, 2009 |
| Replies: 3 Views: 292 int main() is missing return(0);
Which is what would terminate you program, as well.
btw, You don't need system("pause");
cout <<"Slam on your keyboard."; cin.get(); |
Forum: C++ Aug 1st, 2009 |
| Replies: 2 Views: 291 Have you tried <algorithm>'s remove (http://www.cppreference.com/wiki/stl/algorithm/remove)?
Something like:
string.erase(remove(string.begin(), string.end(), "-."), string.end());
By the way,... |
Forum: C++ Jul 12th, 2009 |
| Replies: 7 Views: 860 And those errors would be? |
Forum: C++ Jul 12th, 2009 |
| Replies: 7 Views: 860 Why are you using Races as a pointer?
You should format your code, it's hard to read. |
Forum: C++ Jul 7th, 2009 |
| Replies: 18 Views: 813 Debugging, since it usually prints right when you tell it too, while your regular debugger is flipping out. |
Forum: C++ Jul 5th, 2009 |
| Replies: 8 Views: 393 http://www.cplusplus.com/doc/tutorial/dynamic/
type *var = new type[size];
if(!var) return(false); /*or somesort of error handling*/
delete [] var; |
Forum: C++ Jun 29th, 2009 |
| Replies: 8 Views: 408 All the tobasco sauce I just drank. I can't feel my tongue.
Does that answer your question? |
Forum: C++ Jun 29th, 2009 |
| Replies: 8 Views: 408 Code::Blocks with MinGW is my choice.
.NET is like asking someone to commit suicide. It's a bloated piece of crap. |
Forum: C++ Jun 27th, 2009 |
| Replies: 13 Views: 605 http://www.cplusplus.com/doc/tutorial/dynamic/ |
Forum: C++ Jun 23rd, 2009 |
| Replies: 3 Views: 330 Programing's programing. Unless you're doing system specific stuff. |
Forum: C++ Jun 11th, 2009 |
| Replies: 16 Views: 765 What evil being designed such a thing?! |
Forum: C++ Jun 11th, 2009 |
| Replies: 16 Views: 765 Other than hobbyist and maintenance projects, not many people will ever touch something like a 4-bit machine or any other sort of setup. |
Forum: C++ May 29th, 2009 |
| Replies: 4 Views: 470 Load it onto a SD card, shove it into the PPC, find the executable in explore, double click it with your pointing device. |
Forum: C++ May 19th, 2009 |
| Replies: 6 Views: 339 One, site rule, use CODE TAGS.
Two, I'm sure it won't compiler with non-existent <cstd1ib>.
Three, don't use exit(). You're in main() so why not just return(1)?
That's just all I saw while... |
Forum: C++ May 19th, 2009 |
| Replies: 6 Views: 339 Drag mouse to highlight the text, Ctrl+C, go to place you want it copied, Ctrl+V. |
Forum: C++ May 6th, 2009 |
| Replies: 7 Views: 306 You're just inviting people to do it, by "challenging" them to copy it. |
Forum: C++ Apr 29th, 2009 |
| Replies: 13 Views: 762 It's bundled with Windows, so it's part of it already. Along with WinINet. |
Forum: C++ Apr 5th, 2009 |
| Replies: 12 Views: 639 Best tut on the Windows 32 PE("exe") format
http://webster.cs.ucr.edu/Page_TechDocs/pe.txt
Exe A gets B's DOS header, with the PE offset it gets the IMAGE_NT_HEADERS, right afterwards is the... |
Forum: C++ Apr 5th, 2009 |
| Replies: 12 Views: 639 Okay, but what OS are you on?
You could append the data to the end of the file, spread it through out unused header crap, or:
create your own section and declare a variable(preferably a string)... |
Forum: C++ Apr 5th, 2009 |
| Replies: 12 Views: 639 Well why not just save it in a encrypted file? Keeps everything separate from getting lost. |
Forum: C++ Apr 3rd, 2009 |
| Replies: 5 Views: 577 Does your project require boost? I'd just avoid it altogether. |
Forum: C++ Mar 21st, 2009 |
| Replies: 3 Views: 736 ifstream, (http://www.cplusplus.com/reference/iostream/ifstream/)and ofstream (http://www.cplusplus.com/reference/iostream/ofstream/) |
Forum: C++ Mar 4th, 2009 |
| Replies: 10 Views: 1,057 break; Just jumps, after an evalution.
return(x); Will probably store the value were ever it feels appropriate, then tells the OS to return back to the called procedure. |
Forum: C++ Feb 24th, 2009 |
| Replies: 3 Views: 474 It was edited for not following the rules.
Your program does nothing but get numbers because it goes:
declare
compute empty values
get input
display input
You probably should keep the... |
Forum: C++ Feb 12th, 2009 |
| Replies: 5 Views: 1,006 What rewind()? ifstream.seekg(0, ios::beg); |
Forum: C++ Feb 2nd, 2009 |
| Replies: 4 Views: 1,188 Pretty much.
class AClass
{
private: /*or protected, depends on your needs*/
bool truth;
public:
bool return_truth();
}; |
Forum: C++ Jan 29th, 2009 |
| Replies: 22 Views: 1,376 Sloppy, you need a better coding style. Look at: for(int j) if() code
for(int j) if() code
that looked at first like you had a for loop with a for loop with the same variable j being redeclared.
... |
Forum: C++ Jan 28th, 2009 |
| Replies: 4 Views: 436 Loop though the characters and do whatever you feel is adequate. Not much to beginners level "encryption." So go write it!
I assume you used a search engine? Other wise look up "cipher," and "c++... |
Forum: C++ Jan 25th, 2009 |
| Replies: 19 Views: 870 You really need to work on your order of operations.
You need to do the subtraction first, then divide that number by the constant of 9/5(1.8); not 1.8 divided by the difference.
Go to the... |
Forum: C++ Jan 25th, 2009 |
| Replies: 5 Views: 448 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... |
Forum: C++ Jan 25th, 2009 |
| Replies: 19 Views: 870 What's the output of temp before you use the function?
Any code to see how you're going about that? |
Forum: C++ Jan 25th, 2009 |
| Replies: 3 Views: 1,256 Why are you recursively looping a function like that? It's hard to follow.
Also not sure why you're not using [icode]int main()[/code], globals in that way, string.h, or idk this is way more complex... |
Forum: C++ Jan 23rd, 2009 |
| Replies: 5 Views: 354 How about:
vector<string> blah;
string temp;
for(int i = 0; i < 52; i++)
{
some_random_string_generating_function(temp);
blah.push_back(temp);
} |
Forum: C++ Jan 22nd, 2009 |
| Replies: 1 Views: 289 Arrays have to be constant.
Try vector<int>, or allocate the memory and delete it at the end.
int *an_array;
/*input*/
an_array = new int [numb]; |
Forum: C++ Jan 22nd, 2009 |
| Replies: 8 Views: 490 MinGW 5.1.4 (http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=240780&release_id=595197)
Download, include the g++ option, unzip the files to a file and copy them over to the... |
Forum: C++ Jan 22nd, 2009 |
| Replies: 8 Views: 490 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... |
Forum: C++ Jan 20th, 2009 |
| Replies: 5 Views: 951 Have you tried a modulo operation? |
Forum: C++ Jan 16th, 2009 |
| Replies: 6 Views: 1,473 Windows API, http://msdn.microsoft.com/en-us/library/aa446854(VS.85).aspx, or? |
Forum: C++ Jan 15th, 2009 |
| Replies: 8 Views: 370 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... |
Forum: C++ Jan 12th, 2009 |
| Replies: 3 Views: 451 |