2,045 Posted Topics
Re: Unless you have to use it for some reason (it's nearly 20 years old!!) go for[URL="http://www.microsoft.com/express/Downloads/#"] Visual C++ Express Edition[/URL] or [URL="http://www.codeblocks.org/"]Code::Blocks[/URL] If you're stuck with it, search in this forum or the C forum for directions on getting it to work (the C forum posts will be related to … | |
Re: Are you trying to make sure that none of the comboboxes have the same value selected or if they have one of the same options for value that another combobox has? | |
Re: The first error is simply a spelling error. The next 2 errors are saying that your class is missing declarations for those variables. Look at lines 43 and 44 based on other programs you've seen. How do they declare objects of a class? | |
Re: [QUOTE=cwarn23;1192144]I will have to use the dictionary for that.[/QUOTE] I use half of mine to prop up the table and the other half to give me a boost while driving. It's a biiig book. | |
Re: Welcome. Give this a read:[url]http://www.daniweb.com/forums/announcement8-2.html[/url] . At least make some attempt at what you have set out to do. I'm confident that you have used files and strings (which is really all the login system is) in smaller programs it's just a matter of making something that can integrate into … | |
Re: In line 18 for example when you have [icode] nem1 = (nom1/num1)*100; [/icode] (more descriptive variable names might serve you better in the future) the nom1/num1 is an integer division so that something like 2/3 will yield 0, 3/2 would yield 1 etc (the decimal portion is tossed). To alleviate … | |
Re: 1) Which system are you using (MFC or Winforms or...)? 2) Where are the new values coming from? | |
![]() | Re: The best method (though I don't have any advice on it) is using a background worker: [url]http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx[/url] ![]() |
Re: It's not even in response to anything, so the flimsy attempt to cover up the spamming becomes even flimsier. Of course by all of us replying to this infernal crapola we're boosting the reads of the thread. Should just have been deleted as garbage, IMHO | |
![]() | Re: Under the Project menu: choose <projectname> Properties. Go to Configuration Properties. Under Linker/General: fill in the Additional Library Directories and under Linker/Input: fill in the Additional Dependencies with the .lib names ![]() |
Re: I couldn't find any way to do it within the settings either. Your best bet would probably be to do it within your code itself, taking into account the margin around the linklabel and positioning it at center of panel - margin of linklabel - 1/2 width of linklabel for … | |
Re: Put your code in an infinite while loop (using [icode] while(true)[/icode]) and [icode]break[/icode] out of it when you want to exit. All of your function declarations would stand anyway and global variables would persist during the program execution, so I'm not sure what you mean by that. | |
Re: This is an ideal situation which which to use stringstreams. Are you locked into using the characters array? Also, itoa is non-standard so it's not guaranteed to be available on all compilers. | |
Re: use the getline function to get input with a space [url]http://www.cplusplus.com/reference/string/getline/[/url] What do you mean by "in the char it also contains white space"? What are you trying to accomplish? | |
Re: Your syntax is out of order here: [code]car * cars[strcture] = new car; [/code] The syntax is incorrect here (look at the examples in your book and even within your code more closely). [code]while(count2 =! strcture)[/code] If you're making a while loop, make the index variable and the count variable … | |
Re: I'm trying really hard to come up with something but he has such an extensive website ([url]http://www2.research.att.com/~bs/[/url] if anyone doesn't know it) where he has answered so many questions already. I might ask him if he's going to come out with a new edition of his book covering C++0x in … | |
Re: I think it was intended for Computer Science, for better or worse. I had flagged to it to be moved... ![]() | |
Re: Check out this thread. [url]http://www.cplusplus.com/forum/general/3570/page1.html#msg15410[/url] Basically you're stuck with platform dependent (non-portable) solutions. Using a library like ncurses(on *nix) or pdcurses ([url]http://pdcurses.sourceforge.net[/url]) would give a slightly more portable solution. | |
Re: I wish there were a website in which you could type in a concept or idea and it would give you websites with related topics. | |
Re: Your temparray is exactly that. It's created within the local block of the function and destroyed when the function exits, unfortunately. Pass in an array by pointer so that your function signature looks like [code] void arrayfunction(float arr[],float flt1,float flt2,float flt3) { //load up the array here //still exists on … | |
Re: Check out [url]http://en.wikipedia.org/wiki/XOR_cipher[/url]. I think that's what the assignment is trying to get you to do. | |
Re: I have not read it, but I believe the Ivor Horton Visual C++ 20XX {05,08,10} covers some of the CLR-Winforms (in addition to MFC, I believe). The winforms programming requires you to use an odd dialect of C++ (called C++/CLI) so I think a lot of people avoid it because … | |
Re: [code] double arrive = integar1 + (integar2/100); double depart = integar3 + (integar4/100); [/code] What portion of an hour is 30 minutes? It's surely not 0.3. Otherwise just go ahead and do the portion for the truck. (and just a nitpicky thing but you don't need to include fstream) | |
Re: What are the types of both arrays? Also, the way you have it laid out if you hit a 1 on the first pass through the while you'll get stuck there (unless you are incrementing row and col somewhere else). | |
Re: Check lines 64, 77, and 98. | |
Re: What does DELIM consist of? The reason you are getting one line is your ReadLine is not in a loop. You're going to have to read in a line, split it in two, drop the label, place the data in the array and move to the next line. | |
Re: See if the content of this thread [url]http://www.daniweb.com/forums/thread27905.html[/url] will help you. Basically, you can use a string stream with getline using a delimiter (analogous to using getline with a delimiter on an input stream). | |
Re: What does picgen look like? Changing the background image of the picturebox (which is what it should be doing) should cause a refresh on the control, IIRC. In fact if you had a uniform wait time in between you could use a timer control. | |
Re: What are you using for a windowing library ("...in two text box")? (e.g., Win32 API, MFC, CLR-Winforms, Qt) | |
Re: You need to change your project to a Win32 Console project rather than a plain Win 32 project. I'm not sure how to do it within the settings of the program itself, so the quickest way is to probably just make a new project (and uncheck precompiled headers while you … | |
Re: No one is going to give you the code. You'll have to make some decisions about how you'll populate your arrays, whether you hard code the words into each or read them in from a file, etc. You can just search for the words in the array and output the … | |
Re: Fbody, your line 2 should read [icode] myString += " 123";[/icode] I believe. | |
Re: Hint: [icode] x ^ y [/icode] takes the exclusive or (XOR) between the bits of the two integers it is not the proper operation. The [icode] pow() [/icode] function of [icode] <cmath> [/icode] is used for that but is not necessary here. You are correct in needing a for loop. … | |
Re: If this is the same question as your other post please request that a moderator closes this one and direct people to your other one. It's too confusing to have two posts open with the same topic. | |
Re: Never use gets for input, you can overrun the end of your input buffer and crash your program, etc. Use fgets instead, if you must use the C library functions. I'm having a hard time understanding how the snippet you posted relates to either getpass or sign_in (I get that … | |
![]() | Re: Hint: within your loop, keep track of the highest and lowest values as they are coming in (by comparison with the existing highest and lowest values). Think about what you need to keep track of to take the average and keep track of that in your loop as well. Trace … |
Re: You want to include [icode] <string> [/icode] instead of <string.h> to declare it as a [icode] std::string [/icode] which has a [icode] length() [/icode] method (really just an alias for the [icode] size() [/icode] method). [icode] strlen() [/icode] comes in [icode]<string.h> [/icode] (or <cstring> in a compiler that conforms closely … | |
Re: What are the values that you are putting in the comboboxes? Rather than use Convert try using Int32.Parse() or Int32.TryParse() and check the values before you put them into the DateTime constructor. I'll have to check if the DateTime constructor makes sure that the date is in a reasonable range. … | |
Re: You have a set number of lines corresponding to the maximum number. If the count in your int array exceeds a certain criteria print a star, doing this for each index of the array. Take a stab at it, you'll probably come pretty close and post back if you have … | |
Re: There is a forum dedicated to C#. This is not C++ code. I have flagged your post to be moved there by a moderator. | |
Re: I cannot speak to the quality of this site or their code but if you go to [url]http://ligarto.org/rdiaz/Software/Software.html[/url], the Pomelo package seems to have what you are looking for (get the "Download the source code for the statistical tests" package). That Apophenia library seems to have a lot of dependencies … | |
Re: I had suggested in the "Who Does It Better" thread that she change it to a MSDN type approach where people can propose a particular answer or answers as a solution and the OP has the final veto power. Moderators can approve an answer after a period of time if … | |
Re: I would make 2 arrays, one holding numbers and one holding counts corresponding to the numbers. If you want to process the number at each entry, check and see if the number exists in numbers array. If it does, increment its corresponding count, if not add it to the numbers … | |
Re: This site is indispensable: [url]http://www.cplusplus.com/reference/[/url] (their tuts are good too but it's nice to be able to pull up a function and get a quick snippet to go with it) [url]http://web.cs.mun.ca/~michael/c/ascii-table.html[/url] is a nice plain ol' ASCII table. For more advanced stuff check out [url]http://www.eternallyconfuzzled.com/[/url]. It's very well written (by … | |
Re: "used" is a std::string so it uses the find() method particular to strings. See [url]http://www.cplusplus.com/reference/string/string/find/[/url] versus the <algorithm> version (your first example) [url]http://www.cplusplus.com/reference/algorithm/find/[/url] | |
Re: A couple of hints: Call [icode] srand((unsigned)time(0)); [/icode] once and only once at the top of main (or anytime before your first [icode] rand() [/icode] call but top of main is a good place). To get numbers in a range 0 to maxvalue inclusive use [icode] rand() % (maxvalue+1) [/icode] … | |
Re: Which code? For the second problem, btw, you just need the MouseHover and MouseLeave events for the picturebox, changing the background image to picture2 on MouseHover and changing it back on MouseLeave. | |
Re: You need the arrow [icode] -> [/icode] and not the [icode] . [/icode] on lines 15 and 16 because theTime is a pointer. | |
Re: For example, [code] if(x >=1 && x <=5) [/code] will work | |
Re: I'm not sure about what you are asking. Please be more specific. Even better, post the specific code with which you are having trouble. |
The End.