Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
3
Posts with Upvotes
2
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
~5K People Reached
Favorite Tags
Member Avatar for CppFTW

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 …

Member Avatar for psk_31
0
1K
Member Avatar for CppFTW

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++) …

Member Avatar for CppFTW
0
160
Member Avatar for jeffcruz

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 …

Member Avatar for Lerner
0
125
Member Avatar for batchprogram

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 …

Member Avatar for EddieBre
0
202
Member Avatar for d3mos

Just add the line: [CODE]#define fasle false[/CODE] to the top of your file and the program will work!

Member Avatar for chiwawa10
0
99
Member Avatar for CppFTW

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 …

Member Avatar for kevint77
0
491
Member Avatar for whotookmyname

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 …

Member Avatar for whotookmyname
0
303
Member Avatar for CppFTW

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 …

Member Avatar for CppFTW
0
2K
Member Avatar for CppFTW

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, …

Member Avatar for CppFTW
0
260
Member Avatar for CppFTW

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 …

Member Avatar for CppFTW
0
144