137 Posted Topics
Re: This amount of code is impossible to read! Test your stack before attempting to use it! | |
Re: The deference operator is used because m_pDlg is a pointer and it needs to be dereferenced to access the object at this location. If the OnReceive method belongs to CDialog and m_pDlg is a CDialog, then you don't need to cast to ServerDlg. | |
Re: You are copying the content of the cin stream, so it will never end until you press Enter, maybe. So it never ends. | |
Re: You can always modify your image to add borders that will solve your problem... | |
Re: It depends on what you're planning to do with your book container: -Do you want to find something inside lots of time? Consider using a set (O(log n) search time). -Do you want to keep indexes or track of information inside your container. If yes, an array would be useful. … | |
Re: Just put a try-catch with the correct exception, FormatException try { //Convert text boxes } catch (FormatException e) { Console.WriteLine("Invalid text in boxes!"); } | |
Re: Can you debug your application, step line by line, and tell us the line where the application closes immediately? | |
Re: Can you divide your window into sections (like address info, preferences, interests), so you can query sections like this: addressInfo.Fill(l_text); preferences.Fill(l_text); interests.Fill(l_text); It will distribute your construction of the l_text variable over the sections and make the code less ugly by having less bigger methods. I suggest, if it's the … | |
Re: I'm not sure to understand what you want to do.... Can you post your code so I can look at your program? | |
Hello! I have problems with modal MFC windows over 3dsMax. I'm popping a MFC modal window over 3dsMax (I'm programming a plugin for 3dsMax, if you mind), so I can't click on any 3dsMax window button, because the modal window is here. The modal window, by clicking on a button, … | |
Hello, everyone! I'm using the Win32 API PeekMessage function to retrieve key stroke events. I have a problem: suppose that someone holds the A button. PeekMessage will return messages for the A press event. Now, while A is pressed, someone holds B. PeekMessage will return only the B press event … | |
Re: If you're using an int variable for keeping a decimal value and you want to convert it into a binary value, you should know how an int is represented. An "int" uses 32 bits for representing the number. You can use binary operators in C++ to get the bytes. (OR … | |
Re: Use System.out.println("Your message") to print debugging messages about your input string and the value of every variable. First, ensure that the string is received from the scanner. After, look in the code of the stack. | |
Hi, everyone! I'm having trouble with a linker error (I'm using Visual Studio 2008) and I would like to have some tips on solving this problem: This is my code: Bill.cpp [CODE] #include "Bill.h" #include "../Exceptions/InvalidArgumentException.h" Bill::Bill() { } Bill::Bill(string shopName) { if (shopName == "") { throw(InvalidArgumentException("The shop name … | |
Re: I think that this is what you need: [CODE] (require mzlib/compat) (define alternate? (lambda (ls) (letrec ([alter-helper (lambda (pos1 pos2 ls) (if (< pos2 (length ls)) (let ([list-at-pos1? (list? (list-ref ls pos1))] [list-at-pos2? (list? (list-ref ls pos2))] [atom-at-pos1? (atom? (list-ref ls pos1))] [atom-at-pos2? (atom? (list-ref ls pos2))]) (if (or (and … | |
Re: If your operator=() works, extract the code that creates a new list with the one provided as a parameter and use it in your copy constructor. Search for the refactoring tip Extract Method. | |
Re: Just post your code if you have problems and we'll check it. | |
Re: Why don't you write that for getting input from the user: string breed; cin >> breed; This method does not get the "\n". | |
Hi, everyone! I am using Interop.Photoshop.Dll from my C# Windows Forms application. I am using a com object that Adobe Photoshop CS4 provides to use Photoshop in my C# program. I'm using the ApplicationClass class to launch Photoshop. I have Photosoft CS3 and CS4 on my machine. When I do … | |
Hi, everyone! I'm writing a program in C# that needs to know opened files in a Photoshop CS4 window. The old versions of Photoshop have a MDIClient window in the program that can be getted with GetWindow() and GetClassName() calls. So, I can get the name from the window title … | |
Re: Check this page: [url]http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html[/url] | |
Re: Looks good, but there is a piece of code I would like to show you: if(is_door_opened==true) You can simplify this conditionnal expression with: if (IsDoorOpened()) and make this method private, if no other entity external to the class has a need for it. This is a refactoring tip (Simplify Conditional … | |
Re: For the step 13, it tells Visual Studio to include these libraries for the link, because the functions you are using with SDL are implemented in these libraries. The librairies must be in the additional library directories (in Linker/General) or in C:\Program Files\Microsoft Visual Studio (your number)\VC\lib. | |
Re: If you are using UNIX, you can use valgrind to check for memory leaks. You need to add --tool=memcheck on the command line to check for leaks. | |
Re: [url]http://www.codeguru.com/forum/showthread.php?t=366064[/url] You can use std::sort with a STL container, like a vector or a list. You will need to write a function that determines if a element is greater that an other one. | |
Re: Are you sure that the file denoted with the name you provided exists? I'm pretty sure that the answer is yes, but do you really have gSize vertices in your file? Do you really have a line at each end of a vertex definition in your file that is -999? … | |
Re: This site helped me a lot to understand the design patterns: [url]http://sourcemaking.com/design_patterns[/url] | |
Re: It is normal that you jump directly to system("pause") when the operator is not correct the first time. You are leaving the if-else clause after the second input prompt. You should do something like... while(input is not correct) { //Ask for input //Verify it. } | |
Re: You should pay attention to how you have divided your problem into functions. A function like computeCommission(int price) can be useful... |
The End.