- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 3
- Posts with Upvotes
- 2
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Hi, The shortcut to minimize to desktop (Windows key + D) is not working ever since I upgrade to Windows 7. It's almost like windows just ignores the combination. This was really useful to me. Does anybody know why it isn't working or what else I can do? Thanks in … | |
Hi, I was wondering if the compiler Visual C++ is smart enough to optimize code like this: [CODE=C++]string temp = "abcd"; string temp2 = "hahaha"; string temp3 = temp + temp2;[/CODE] "temp + temp2" can be replaced by "abcdhahaha" [CODE=C++]vector<char> alphabet; for (char i = 'a'; i <= 'z'; i++) … | |
Re: Hi, There are some problems with your code: 1. [QUOTE]Create an overloaded constructor that takes two integer arguments. This argument will allow the class user to specify the numerator and the denominator[/QUOTE] You should use Fraction (int numerator, int denominator); 2. [CODE]Fraction (); Fraction (double); Fraction (Fraction &);[/CODE] These should … | |
Re: Hmm, well make sure that "d3d9.h" includes #endif if there is #ifndef The problem might be that you are not using [URL="http://en.wikipedia.org/wiki/Include_guard"]include guards[/URL] and are accidentally including either the .h or .cpp file twice. Also, you should add a blank line to the end of each of your files (some … | |
Re: Just add the line: [CODE]#define fasle false[/CODE] to the top of your file and the program will work! | |
Hi, does anyone know why I am getting these error messages? I'm using Code::Blocks IDE and MinGW(GCC) compiler. I included boost (v1.39.0) libraries already. I can use them correctly with #include <boost/lexical_cast.hpp> Also, I defined BOOST_NO_DEPRECATED [CODE]#include <boost/filesystem/operations.hpp> #include <string> using namespace std; int main() { //The meta data file … | |
Re: One thing I noticed was that you did [iCode]string str = a + "x" + b+ ".txt"[/iCode] It should be [iCode]string str = "a" + "x" + "b" + ".txt"[/iCode] because if you just put a and b without quotes, the compiler will think that you are using the variables … | |
I am really stumped with a problem my program keeps giving me. Randomly, a file I try to open returns fail() to ifstream and can't be read from. I have a feeling it has to do with these 2 functions I have been using. Please help. Thanks! PS: I tried … | |
Hi, why doesn't this code work: [CODE]int main() { cout << "Hi!\n"; #ifdef DEBUG cout << "I'm in debug mode!\n"; #endif return 0; }[/CODE] I am trying to make the message "I'm in debug mode!" only print when I am in debug mode for my IDE (Visual C++). But also, … | |
Hi, why isn't this code is copying the file a.txt correctly? [CODE]int main() { ifstream input("C://Users//Me//Desktop//a.txt"); input.seekg (0, ios::end); int length = input.tellg(); input.seekg (0, ios::beg); while(true) { char* buffer = new char[length]; input.read(buffer, length); ofstream output("C://Users//Me//Desktop//b.txt"); output.write(buffer, length); break; } return 0; }[/CODE] I attached a.txt and b.txt in … |