338 Posted Topics

Member Avatar for mikeandyikes

We generally don't do 'instant' solutions or links to them here. We like to help those who help themselves. If you've put some effort into a solution, but don't understand why you get the results you do, or the errors you're getting, post the errors or results (preferably with code …

Member Avatar for mikeandyikes
-1
131
Member Avatar for Dannielf

is state() supposed to detect winners? First of all, it does not always return a value. Secondly the expression [icode]game[1]&&game[2]&&game[3]==play[/icode] does not test positions 1, 2 and 3 for the value play. I think you wanted [icode]game[1] == play && game[2] == play && game[3] == play[/icode] Third, when you …

Member Avatar for Lerner
0
116
Member Avatar for wotthe2000

Will the grid really contain 'x' where it doesn't have a word? Is it defined that all words will start at the left and go right, or start at the top and go down? If there are going to be other letters in the grid, it would help to have …

Member Avatar for Murtan
0
278
Member Avatar for andyT

At least part of the problem is in your last set of code... The tempptr was null, so you allocated and initialized it, but tempptr was just a copy of the pointer from [icode]current[target[i]][/icode] you made no effort to set the original array entry to the newly allocated item. Also …

Member Avatar for andyT
0
117
Member Avatar for cbreeze

Please be more specific with your question..."When I run the program, I'm seeing ____. I tried ____ but it didn't solve it." or something along that line. Does the code compile? Does the program run? Does it do what it is supposed to do?

Member Avatar for Freaky_Chris
0
2K
Member Avatar for poobert

If I ever wrote methods like writefile(...) and readfile(...) for a class that was to be streamed to/from files, I would pass the file handle (or stream) as an argument to the method so that it didn't have to worry about opening the file or closing the file. It would …

Member Avatar for Murtan
0
124
Member Avatar for chasee

Another common option is to leave the board in a single dimensional array. Depending on how you interface to the board, it has advantages and disadvantages. For example, a 3 x 3 board would use 9 elements in an array. The first 3 would be the first row (or first …

Member Avatar for chasee
0
280
Member Avatar for CoolAtt

Then modify the sample code he gave you. Programming is an adventure, TRY something and see what it does (especially on simple things like this). If you try something and it doesn't do what you want, either modify it and try again, or post it here with a 'it does …

Member Avatar for Murtan
0
1K
Member Avatar for StarZ

Please use code tags to wrap your code. Your code as posted: [code=python] house = ["TV", "computer", "phone", "playstation", "Wii", "EMPTY"] print "items in my house are: " print house house = ["TV", "computer", "phone", "playstation", "Wii", "EMPTY"] print "Pick an item to fill in the empty space: \n1 =TV\n2 …

Member Avatar for Murtan
0
140
Member Avatar for nedsnurb

The [icode]if[/icode] is the proper construct. You couldn't replace them with while or do/while without significant restructuring of the methods. I will note however that the remove method could be improved. It presently will 'leak' the newitem that it created. (The creation of which was entirely un-necessary.) The method will …

Member Avatar for ArkM
0
96
Member Avatar for christiangirl

I would agree that it does not look like it is quite linked up right. Where is the Applicant class defined? (I see [icode]Applicant app[/icode] but not the class, does this compile?) I'm not sure, but it appears that you are repeating some (or all) of the data from the …

Member Avatar for Murtan
0
113
Member Avatar for jaasaria

Quoting from the link: After the installation, the following files should be present on the target system in the indicated folders: <windows system>\Msdbrptr.dll <program files>\Common Files\Designers\Msderun.dll <windows system>\Msstdfmt.dll The inclusion of Msdbrptr.dll (and its dependent files) typically corrects this problem. If you are still experiencing problems, make sure that the …

Member Avatar for aktharshaik
0
239
Member Avatar for Awais Ahmad

If the array entered was: [code] 40 20 10 30[/code] I think the output should be:[code] 2 1 3 0[/code] Does it look like I understood the what the program is supposed to do? I will not just solve your problem. I will help YOU solve your problem. If you're …

Member Avatar for Murtan
0
119
Member Avatar for davids2004

Short answer: Move the [icode]do {[/icode] from line 23/24 in front of the random stuff starting on line 15. Longer answer: If you were to break each problem type out into a function, you could call it from the [icode]if (choice ==[/icode] stuff. The function could then generate the random …

Member Avatar for davids2004
0
171
Member Avatar for cVz

That looks like a mass-mailing application...not sure I WANT to help, but does it just not work or are you getting an exception? If you're getting an exception, what is it? If it just "doesn't work", what debugging (to ensure you are getting the right parameters set) have you done?

Member Avatar for cVz
0
108
Member Avatar for oldSoftDev

ALWAYS use CODE tags when posting code. Also all of the leading whitespace is missing from your posted code. In python, leading whitespace is an essential part of your code, you can't compile without it. (I was going to re-post your code here with the code tags, but I don't …

Member Avatar for oldSoftDev
0
108
Member Avatar for tomtetlaw

Your loop starting on line 129 is only one line long (130) You should probably also indent lines 131 to 147 to the same level as 130 to make them part of the loop.

Member Avatar for tomtetlaw
0
199
Member Avatar for mcsean2163

Please use the CODE tags around anything that is a block of code, it makes it easier to read. [code=c++] #define API_DLLEXPORT extern "C" __declspec(dllexport) HINSTANCE hIQ_Measure; // handle for IQ_Measure DLL hIQ_Measure = LoadLibrary("IQ_Fact.dll"); // you only need to do this once typedef IQ_RESULT_TYPE *(*DLL_PROC)( LPTSTR); typedef IQ_RESULT_SWEEP_TYPE *(*DLL_SWEEP_PROC)(LPTSTR); …

Member Avatar for Murtan
0
197
Member Avatar for pyth0n

Not to be too terribly picky, but the code in the above post where it uses [icode]if int(num) not in [0,1]:[/icode] will fail if the user enters non-digit characters. If the test were performed with strings it would not fail: [icode]if num not in ['0','1']:[/icode]

Member Avatar for Murtan
0
3K
Member Avatar for Majestics

If you want help (with what obviously appears to be homework) show us what you have so far. We will usually help you with homework, but we won't do it for you.

Member Avatar for Majestics
0
106
Member Avatar for deepas

I'm not certain I understand your question or what you need help with. (Specific questions usually get faster and better answers.) Are you saying that you need to write an application that will be run weekly to extract data from an Excel worksheet and insert it into an SQL database? …

Member Avatar for LizR
0
120
Member Avatar for JCasso

This sounds like an assignment, but you will probably have to re-create what strtod() does. You will end up validating the string (or characters) and building the number by recognizing the digit characters.

Member Avatar for ArkM
0
1K
Member Avatar for Vandithar

I believe your algorithm is the source of your problem...you are running 3 nested loops, when I think your intent is to iterate at least some of the arrays simultaneously. Your algorithm (as written) does the following: For each row of the first array, compare it with each of the …

Member Avatar for Vandithar
0
146
Member Avatar for krany18

I think the problem is where you're building your select [code]SqlDataAdapter da = new SqlDataAdapter("select * from mudiamINC where fname like" + TextBox1.Text + " %", con);[/code] I'm think you need a space after the like, but not before the % [code]SqlDataAdapter da = new SqlDataAdapter("select * from mudiamINC where …

Member Avatar for Murtan
0
100
Member Avatar for Icebone1000

I think the problem that you are running into is the fact that it is VERY unlikely to just randomly select digits to fill into the grid and have a grid that meets all of the criteria. There are improvements you can make to your algorithm to make better choices, …

Member Avatar for Murtan
0
241
Member Avatar for Umar Ali

You have a basic misunderstanding related to pointers. Pointers must be made to point to a valid storage location before they can be used to reference anything. [code=c++] class Foo { private: int mX; int my; public: Foo(); int getX(); int getY(); void setX(int x); void setY(int y); }; Foo …

Member Avatar for Murtan
0
176
Member Avatar for pavel989

LOWORD is a macro, used to extract the 'low word' from a long. HIWORD extracts the 'high word' There is another macro that can be used to put them back together: [code] LPARAM MAKELPARAM( WORD wLow, WORD wHigh ); [/code] So a call like: [icode]MAKELPARAM(somenum, HIWORD(lParam))[/icode] would be pretty close …

Member Avatar for Murtan
0
118
Member Avatar for cout<<"alias"

If you want the program to ask for multiple inputs, you need to re-prompt and re-accept input inside the while loop. Try putting it right after you display an answer.

Member Avatar for cout<<"alias"
0
386
Member Avatar for kempablavitt

Is this game supposed to be like the card game memory? Where you turn over two cards and if they match you count the pair (usually removing the cards) and if not flip them back over? So for each user turn: the user should pick a first card you 'turn …

Member Avatar for Murtan
0
270
Member Avatar for practica

I see a few things that could be done to clean the code up. The largest of which is that you have one HUGE method that seems to want to do all of the work. This is almost always a sign of a poor design. The pseudo code for the …

Member Avatar for Murtan
0
119
Member Avatar for Sally123

A little more data might be useful. Do you have a more concrete example of the relationship? Does your form have all of the data necessary to add one row to each table? Is there enough data to add more rows to either table?

Member Avatar for Murtan
0
55
Member Avatar for Lukezzz

Are you asking to programmatically detect when another program opens a particular file? Is the other program known? Would it be sufficient to know if the specific program opens the file, or do you need to detect if the file is opened by ANY program? Are there any real-time constraints …

Member Avatar for Murtan
0
130
Member Avatar for awthein

Not stopping your service is a bit unfriendly, do you properly handle getting stopped if windows is shutting down? I suspect the reason you don't get called a second time is because something you're doing in the first event causes you to be removed from the handler chain. Confirm that …

Member Avatar for Murtan
0
212
Member Avatar for DarkSam

where's the code to support the rest of the algorithm? It looks like it might be useful to write a function to calculate the distance between two cities (or two coordinates).

Member Avatar for Murtan
0
83
Member Avatar for Nighthawkspt

As a side note to the discussion, although it is convenient in this context to have the default Car constructor generate a random car, the constructor seems to be doing an awful lot, including adding delays? I try to promote the simple constructor theory where the constructor is as simple …

Member Avatar for Nighthawkspt
0
163
Member Avatar for Shadedsoul

Is the problem that your application has the input focus and is getting all of the keystrokes instead of the game? Can your application run while minimized? This would remove the input focus from your application and return it to the game. Alternatively, could your application just send the keys …

Member Avatar for Murtan
0
81
Member Avatar for minas1

It doesn't make much sense for a location (specified as latitude and longitude) to support an increment (or decrement) operator at all. The current implementation causes the location to move in a diagonal direction, what is the benefit? How would it be used?

Member Avatar for minas1
0
164
Member Avatar for iamnoangel26

It's been a while since I played in VB, but doesn't the [icode]x = 1[/icode] run every time the timer is called? The sub as displayed reads from [icode]Me.ProgressBar1[/icode], but does not appear to set it, so the value doesn't change here. So if neither [icode]Me.ProgressBar >= 10[/icode] or [icode]x …

Member Avatar for Jx_Man
0
124

The End.