2,045 Posted Topics

Member Avatar for benshrupendra

Did you try what the error message suggested to do? It's telling you you needed the pointer and how to add the & to the function to do it (I have limited experience with threads under C++/CLI but it seems logical as this function pointer is like a delegate).

Member Avatar for jonsca
0
146
Member Avatar for localp

Can you use CMake to generate a Visual Studio project for it? (does it have a CMakeLists.txt in the main directory)

Member Avatar for localp
0
65
Member Avatar for Razorfox

Is there some reason why you have two main()s? That doesn't make any sense. What does the beginning part have anything to do with the problem?

Member Avatar for jonsca
0
63
Member Avatar for myfootballfacts

Go to Control Panel On the left hand side go to Settings and Options/Edit Options Scroll down to Messaging & Notification Under Private Messaging check "Save a copy of sent messages in my Sent Items folder by default" (this setting is unchecked under the default setup, I believe) I can't …

Member Avatar for vb5prgrmr
0
149
Member Avatar for linziza

You need to include "Lottery.h" in LotteryFactory.h (like it has it in the code listing on the site) since you have a Lottery object in the LotteryFactory class. You'll also still need to have Lottery.cpp as a part of your project for the methods of the Lottery class. Including Lottery.h …

Member Avatar for Fbody
0
112
Member Avatar for Anatake

You have text representations of the numbers for each of the boxes. Use the Double::TryParse to get the value. Look up the syntax of it as it uses an "out" variable to return the double. Everything in .NET GUI programming is governed by events. Can you think of a means …

Member Avatar for jonsca
0
226
Member Avatar for BobbieJean

You need to make sure that you have all the files in the same project, or if you are compiling on the command line put BookRecord.cpp first. As for devC++ the version of g++ it uses is too out of date and the IDE itself is no longer being developed. …

Member Avatar for jonsca
0
193
Member Avatar for angel_banned

I'm definitely very sorry to hear about your father. I would look into as much information about the hardware for his setup and what interfaces it uses and what APIs are available (if any, they may not be public). There might even be a setting that could be adjusted to …

Member Avatar for jonsca
0
293
Member Avatar for steventaal

Line 628 is not the right syntax: [code] if (menuchc == 'y' || menuchc == 'Y') [/code] I think that's the least of your worries though. This is quite a, er, creative program. There are a lot of constructs here (goto and calling main explicitly) along with a lot of …

Member Avatar for jonsca
0
123
Member Avatar for shayankhan

Scroll further up in your Form1.h file and you'll find a bunch of variables being declared (your listbox and buttons, etc., it will say [icode] private: System::Windows::Forms::Button^ edit_button; [/icode] or the like). Amidst those put your [icode] private: String ^ SelItem; [/icode]. It won't be "global" but I don't think …

Member Avatar for shayankhan
0
133
Member Avatar for Jennifer84

If I recall, you are using Winforms? Here's an example in C# that you should be able to adapt pretty readily for C++/CLI: [url]http://www.codeproject.com/KB/cs/csdynamicscrres.aspx[/url]

Member Avatar for ShadowScripter
0
262
Member Avatar for Jennifer84
Member Avatar for aldrin12

What have you tried so far? Can you take in the input from the user? Do you know the formula for the area of a square (it's not hard and should be on millions of internet sites if you really don't remember)? Bring those two together and output the result. …

Member Avatar for Stefano Mtangoo
0
201
Member Avatar for group256

Change your loop from [code] while(!fin.eof()) -to- while(fin >> temp) [/code] and eliminate line 17. See [url]http://www.daniweb.com/forums/post155265-18.html[/url] about why .eof() exhibits this behavior.

Member Avatar for group256
0
188
Member Avatar for angel_banned

I would lean away from Dev as (my understanding is) it's very buggy and no longer under development. The Visual C++ Express Edition is a good option but if you want to do winforms you're stuck with C++/CLI which is cumbersome (you can use the Win32 API within Visual C++ …

Member Avatar for wwefriend
0
76
Member Avatar for wwefriend

Are you asking why you can't compile it as a Windows program or am I misunderstanding you?

Member Avatar for wisaacs
0
141
Member Avatar for darelet

You're going to need to implement something like this: [url]http://www.codeproject.com/KB/recipes/csnsort.aspx[/url]. It's probably better to make your numbers into a System::Collections::Generic::List<String^> which has a sort method in it. To use the sort like you want it to, you'll have to making your own class that inherits from IComparer and passing that …

Member Avatar for jonsca
0
158
Member Avatar for Dimesh

1.) Every element is assigned the value zero 2.) Accomplishes the same thing 3.) No different than 2.) 4.) Since you are defining the array you don't need to tell the compiler how big it is

Member Avatar for Dimesh
-1
75
Member Avatar for Jackie91

There's an extra [icode] '\n' [/icode] (newline) in the stream (from when you press enter after the number) that's being taken in by the first getline as a signal that input has ended. So it's getting skipped. ShadowScripter's idea is correct and probably preferable (though you could use stringstreams as …

Member Avatar for jonsca
0
144
Member Avatar for fuggles

Are you using WinForms? If so, turn on the DoubleBuffered property (select your form in the designer and select the cell next to DoubleBuffered on the right hand side, set it to true). I'm not sure how to do the equivalent in other platforms.

Member Avatar for jonsca
0
133
Member Avatar for Don_k

Make it so that your if statement looks for the vowels, then have else if look for the consonants (hint: all the vowels will be filtered out by the first stage so you don't have to be so fussy about the ranges), then have else determine not-a-letter status. [code] if …

Member Avatar for eilans_10
0
158
Member Avatar for happygeek
Member Avatar for happygeek
0
72
Member Avatar for Jeevitha V.K

The best person to ask for the definition of "system hanging" would be the one that gave you the assignment. There's some ambiguity to the term. I think the whole idea seems suspect but maybe it's me.

Member Avatar for finito
-6
159
Member Avatar for Excizted

Are you allocating memory within Vector3? It could be an issue with the copy constructor/operator= but that's just hazarding a guess.

Member Avatar for Excizted
0
196
Member Avatar for mrnutty

I'm still waiting on the source from your polynomial approximation program. :)

Member Avatar for mrnutty
0
71
Member Avatar for Dani

[QUOTE=daviddoria] 2) On sites like (or based on) stackoverflow, there is the ability to mark a response as the "answer". This is very helpful. [/QUOTE] As the theme from "The Spy Who Loved Me" states: "Nobody does it better..." but I do like the feature David was describing. I prefer …

Member Avatar for daviddoria
0
483
Member Avatar for GeekByChoiCe

My [U]unofficial[/U] answers, just relaying (and re-relaying) the info I've heard: Hit the search key with nothing in the box to get the advanced search. I think Dani is working on it, see this post [url]http://www.daniweb.com/forums/post1229170.html#post1229170[/url] and a few posts down. The "mark forum as read" 'bug' is a feature …

Member Avatar for jonsca
0
187
Member Avatar for kaydee123

I'm not sure if this is to what you are referring but a struct can have a constructor just like a class does (the only difference between the two is the default access of the variables, struct everything is public by default and class everything is private): [code] struct element …

Member Avatar for jonsca
0
137
Member Avatar for atifjatt

Please post a piece of your code around that area so we can see what's going on.

Member Avatar for jonsca
0
53
Member Avatar for madzam

Trace through your program by hand and see what happens when you enter 0 (hint the while is going to spin forever because [icode] integer == 0 [/icode] will always be true -- which causes the loop to continue not stop). Also do this for finding the highest and lowest …

Member Avatar for mahmud.2345
0
95
Member Avatar for Dani

[QUOTE=Lusiphur] While we're updating this, is anyone else not getting subscription notification emails? [/QUOTE] No, I haven't gotten any since late on the 7th.

Member Avatar for Lusiphur
0
454
Member Avatar for MrBentley

main should always return an int, void main is non-standard. You don't need the ; after line 30 Line 37, that statement does nothing. Most importantly, [u]never[/u] use gets. It is too easy to overflow the array to which you are writing as you have zero control over how many …

Member Avatar for jonsca
0
211
Member Avatar for Rickay

Because comparing the value in dvar1 with 'q' can be dicey, the best solution would be to make a sub menu (I know it's not exactly what you want but aside from reading in your expression as a string and parsing it out that may be the best way). The …

Member Avatar for jonsca
0
171
Member Avatar for sisterjo

How do you access the elements of an array? Hint you did it just fine about 4 lines before that. It's not critical but usually the notation [icode] counter++ [/icode] is used instead of [icode] counter = counter + 1 [/icode] Also [u] Please use code tags [/u] [noparse][code]//code goes …

Member Avatar for tesuji
0
101
Member Avatar for maria99

Could you show more of the surrounding code? (any data that's put into the vectors beforehand) VC++ 6.0 has a compiler that is [I]much[/I] less standards compliant than the more recent ones, so it's no surprise that 2008 kicked out the code and 6.0 didn't.

Member Avatar for maria99
0
382
Member Avatar for JoBe
Member Avatar for NP-complete
0
271
Member Avatar for Member 785530

VB gave you the correct functions for Win32 API, but are you using the API or MFC or .NET?

Member Avatar for jonsca
0
113
Member Avatar for SacredFootball
Member Avatar for Lusiphur

Yes, I have noticed this on my profile page too and have reported it to Dani. So, you're not alone :) I'll let her speak to any findings, though.

Member Avatar for Lusiphur
0
317
Member Avatar for Anyzen

From [url]www.cplusplus.com[/url] about the operators < > <= >= etc: [url]http://www.cplusplus.com/reference/string/operators/[/url] "These function [sic] depend on the value returned by string member compare." Regarding compare: [url]http://www.cplusplus.com/reference/string/string/compare/[/url] "The member function returns 0 if all the characters in the compared contents compare equal, a negative value if the first character that does …

Member Avatar for jonsca
0
91
Member Avatar for midget66

Not a bad first effort but there are a few things: [icode] main() [/icode] [I]always[/I] returns an int, and is not void. You need to specify that you want [icode] &arayvalues[n] [/icode] on line #10. Your second loop should be to 10 unless you want to add only the first …

Member Avatar for midget66
0
94
Member Avatar for duuude

[quote=duuude]" boost/timer.hpp: No such file or directory. "[/quote] You'll need to download and build the library from [url]http://www.boost.org/[/url]. Some of the facets of the library can be used with just the headers (as they are self-contained) but you'd still have to make sure you had all the dependencies (the headers …

Member Avatar for jonsca
0
208
Member Avatar for p@rse

Here's a freebie but I am sure that you can find [I]many[/I] more via Google [url]http://www.eformulae.com/[/url] This may be a case of once you've done a few of them the translation will become second nature, so you may not need that many.

Member Avatar for Aranarth
0
70
Member Avatar for cwarn23

It works now but I think a mod fixed it. I experienced the same problem (in FF 3.6.6)when I went to check on what cwarn was talking about.

Member Avatar for TrustyTony
0
117
Member Avatar for Member 784453

You're method is definitely not doing what you think it is. It may be "legal" in that it compiles but the logic is far different. The variable you read from the user is boolean. It only takes the values true or false. However, it seems that when you enter a …

Member Avatar for Member 784453
0
121
Member Avatar for c++learner

Why are you calling the function on line 12 before you have values for [I]both[/I] a and b (you just end up with whatever garbage is in b to start with)? If you cout the return of the function all you will get is your zero you return at the …

Member Avatar for NP-complete
0
1K
Member Avatar for anil1991

Search the forums there's an example of one from about 6 months ago. It was an outdated example so you probably don't want to reference too much from it.

Member Avatar for Member 784361
0
107
Member Avatar for siggivara

I'm not familiar with the objective-c syntax, but in C++ it would be something like [code] void func2(NSScanner * myNSScanner) { //yada } void func1() { NSScanner * aScanner = new NSScanner(); //or your parameters func2(aScanner); } [/code] It's different from the integer example because your aScanner is already a …

Member Avatar for siggivara
0
190
Member Avatar for happygeek

[QUOTE=happygeek]What if I were to wear a wig and a dress, would that help? :)[/QUOTE] Anybody got a scouring pad I can use on my brain? [quote=wolfpack]Lost you the first time while scanning for good looking chicks who are into programming[/quote] It's like Wyclef Jean said: "should I ask her …

Member Avatar for WolfPack
0
641
Member Avatar for BobbieJean

Line 51 -- check your = vs. == deleteNode is incorrect as you need to translate your position into i,j (see your instructor's comment) [code] // This array will hold the data. Notice we only need a // one-dimensional array since each node is represented // in both the rows …

Member Avatar for jonsca
0
264

The End.