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
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
159
Member Avatar for jeffcruz

[B]I have had a lot of problems with C++ and I am quite confused. Here is the code so far;[/B] [CODE] #include <iostream.h> #include <stdlib.h> #include <cstring> #include <cctype> class Fraction { private: Fraction (); Fraction (double); Fraction (Fraction &); public: double operMultiplication (); double operSum (); double operDouble (); …

Member Avatar for Lerner
0
124
Member Avatar for batchprogram

I'm an experienced programmer of 5 years in Java & C#, but recently I decided to program in C++ as well. I'm familiar with proper code syntax and advanced programming techniques, but this compiler error i'm getting just stumps me beyond recognition, I've analyzed my code for syntax errors a …

Member Avatar for EddieBre
0
200
Member Avatar for d3mos

[CODE]bool validateCourse ( int courseNum ) { switch ( courseNum ) { case 4587: case 4581: case 9696: case 4590: case 4580: case 4599: case 4583: case 8997: return true; case default: return fasle; } } [/CODE] I need it so if the user enters anything but these course numbers …

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
489
Member Avatar for whotookmyname

I have to open a file named "axb.txt" I have user input a and b as strings i have concatenated the string using string str = a + "x" + b+ ".txt" now i need to open the file. it does not open with fopen(str, ios::app) because str is not …

Member Avatar for whotookmyname
0
298
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
257
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
143