560 Posted Topics
Using C++/CLI-- Is there a good way to return a value (not a DialogResult) from a form shown as a dialog? I plan to use Invoke on a method to update the previous form from within the dialog, if not. I also would like to thank the fine members of … | |
Re: You will have to maintain an array of account numbers. In certain circumstances a programming teacher may accept a statically allocated array--when learning the basics of programming. If you don't know how to use arrays, I suggest you learn how. Truthfully there are (probably) infinite ways to accomplish the task, … | |
For some reason, and it's probably one of those accessibility things like tab ordering, when I hit the spacebar after selecting a button on my form, the spacebar clicks the button. This is NOT acceptable, and I have considered a work around of selecting an invisible panel or other "dummy" … | |
Re: you can also use toupper() or tolower() in <cctype> or use the falling-through behavior of the switch for 'Y' and 'y' etc. Though, personally I would make a small function to test if it was valid. | |
Re: Compile it. My guess is the compiler won't automatically cast the address of that pointer to an integer value. | |
Hi, I am in need of a good reference for C++/CLI. Right now I need to know how to exit the main loop of a form, such as if the user clicked the 'X' at the top right. Nevermind, the function Close() is what I needed. | |
Re: The code for templates must be only in a header file. Which isn't exactly true, the other way is to include the .cpp file at the bottom of the .h when doing that with visual studio you must also exclude the .cpp file from the solution explorer. Easiest/best to just … | |
Re: Yes, you can get your input into a string and parse it. [code] #include <string> #include <sstream> #include <iostream> using namespace std; int main() { string input; getline(cin,input); int value = 0; stringstream(input) >> value; if(value == 0) cout << "Invalid entry." << endl; cout << value << endl; } … | |
Re: Due on Sunday night? Tomorrow is Martin Luther King Jr. Day here too... | |
Re: May have to dynamically allocate the memory using "new" and "delete". Also, in this line: [code] int fileTempSize = data.size(); [/code] int doesn't have the range of the unsigned int, make sure your fileTempSize is the same type as the type returned by data.size() this can cause problems if the … |
The End.