137 Posted Topics

Member Avatar for notuserfriendly

This amount of code is impossible to read! Test your stack before attempting to use it!

Member Avatar for masijade
-1
2K
Member Avatar for LevyDee

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.

Member Avatar for LevyDee
0
207
Member Avatar for Agni

You are copying the content of the cin stream, so it will never end until you press Enter, maybe. So it never ends.

Member Avatar for Agni
0
199
Member Avatar for GAME
Member Avatar for nick.crane
0
141
Member Avatar for maplax

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

Member Avatar for mrnutty
0
109
Member Avatar for virusisfound

Just put a try-catch with the correct exception, FormatException try { //Convert text boxes } catch (FormatException e) { Console.WriteLine("Invalid text in boxes!"); }

Member Avatar for Geekitygeek
0
136
Member Avatar for bhavna_816

Can you debug your application, step line by line, and tell us the line where the application closes immediately?

Member Avatar for Geekitygeek
0
311
Member Avatar for trippinz

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 …

Member Avatar for Geekitygeek
0
146
Member Avatar for IDC_Sharp

I'm not sure to understand what you want to do.... Can you post your code so I can look at your program?

Member Avatar for GDICommander
0
113
Member Avatar for andrewb
Member Avatar for GDICommander

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

Member Avatar for GDICommander
0
105
Member Avatar for GDICommander

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 …

Member Avatar for Taurusk
0
125
Member Avatar for jhegie

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 …

Member Avatar for GDICommander
0
211
Member Avatar for Grn Xtrm

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.

Member Avatar for cymercutie88
0
1K
Member Avatar for GDICommander

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 …

Member Avatar for GDICommander
0
168
Member Avatar for jcoder

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 …

Member Avatar for GDICommander
0
120
Member Avatar for lancevo3

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.

Member Avatar for native
0
510
Member Avatar for wil0022
Member Avatar for sebassn

Why don't you write that for getting input from the user: string breed; cin >> breed; This method does not get the "\n".

Member Avatar for WaltP
-1
121
Member Avatar for GDICommander

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 …

Member Avatar for sknake
0
977
Member Avatar for GDICommander

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 …

0
172
Member Avatar for harshadap

Check this page: [url]http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html[/url]

Member Avatar for harshadap
0
124
Member Avatar for Acute

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 …

Member Avatar for Acute
-2
123
Member Avatar for iammfa

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.

Member Avatar for GDICommander
0
141
Member Avatar for invisi

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.

Member Avatar for invisi
0
139
Member Avatar for group256

[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.

Member Avatar for GDICommander
0
231
Member Avatar for Aprentchacker

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

Member Avatar for Aprentchacker
0
169
Member Avatar for vivekarora

This site helped me a lot to understand the design patterns: [url]http://sourcemaking.com/design_patterns[/url]

Member Avatar for mrnutty
0
120
Member Avatar for methmignonne

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. }

Member Avatar for methmignonne
0
307
Member Avatar for jko2326

You should pay attention to how you have divided your problem into functions. A function like computeCommission(int price) can be useful...

Member Avatar for GDICommander
0
143

The End.