2,045 Posted Topics
Re: 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). | |
Re: Can you use CMake to generate a Visual Studio project for it? (does it have a CMakeLists.txt in the main directory) | |
Re: 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? | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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] | |
Re: Try changing the MaximumSize property of the Form1 | |
Re: 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. … | |
Re: 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. | |
Re: 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++ … | |
Re: Are you asking why you can't compile it as a Windows program or am I misunderstanding you? | |
Re: 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 … | |
Re: 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 | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: Does that qualify you for the nickname "Broke" Winder? | |
Re: 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. | |
Re: Are you allocating memory within Vector3? It could be an issue with the copy constructor/operator= but that's just hazarding a guess. | |
Re: I'm still waiting on the source from your polynomial approximation program. :) | |
Re: [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 … | |
Re: 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 … | |
Re: 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 … | |
Re: Please post a piece of your code around that area so we can see what's going on. | |
Re: 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 … | |
Re: [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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
| |
Re: VB gave you the correct functions for Win32 API, but are you using the API or MFC or .NET? | |
Re: What is the getInFile defined as? | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: 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. | |
Re: 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. | |
Re: 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 … | |
Re: 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 … | |
Re: 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. | |
Re: 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 … | |
Re: [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 … | |
Re: 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 … |
The End.