2,045 Posted Topics
Re: See this: (the first half, particularly the links to their FAQ) [url]http://www.tek-tips.com/viewthread.cfm?qid=1295422&page=9[/url] It sounds like you either need to redistribute the bpl file with it or compile it with different options. | |
Re: This version of getline should probably be your tool of choice [url]http://www.cplusplus.com/reference/iostream/istream/getline/[/url] Beyond that, which parts are stumping you? Can you open a file? Can you search through the characters of a string? | |
Re: Can you keep your numbers in an array? If not, you're going to have to "get" and keep a count of the number of valid digits (hint, you can use < and > with chars), and then "unget" to go back to convert them to numbers. | |
Re: What is the general area of the internship (they could potentially ask you questions about any topic), but to direct you to something specific, it might be helpful to know. Accelerated C++ (Koenig, Moo) is a good one that will start out with some of the principles from the latter … | |
Re: You don't need the "electro" on declare anything on lines 9 and 10, account[0] is already of type electro. I think you'll need a different tactic for copying the string in too. | |
Re: What are the specific issues that you are having with it? "It has many mistakes" doesn't give anyone much to go on. | |
Re: Declare a picture box, set it's coordinates and background image (and the background image layout). Once that's all done, use the .Add() method of the tab control to place it on the form (I think the default is visible, so you don't have to set that before adding it). See … | |
Re: The first actual command of cashier is a cin on line 84. Your program is waiting for your input. Put any text to output before that. | |
Re: I ran your code as is and entered 3 students worth of data in step 1, and then went to step 3 and the data displayed as I had entered them. What does your output look like (you can paste it right in with code tags). I don't think this … | |
Re: See [url]http://www.cplusplus.com/reference/clibrary/ctime/[/url] (each of the functions has an example to go with it when you click on it) Otherwise google for ctime or time.h (which is the C version of the header, but it's the same functions). | |
Re: Most, if not all, of the solutions that you will find will be non-standard and depend on the operating system. Which platform are you using? To get something that can be used cross-platform, try looking into PDCurses (pdcurses.sourceforge.net). | |
Re: Check out the header <cctype>, as it has isalpha(), isdigit(), etc. | |
Re: Please use code tags [noparse][code] /*code goes here*/[/code][/noparse] You shouldn't call main() like that, but the real problem is the semicolon at the end of your if statement [icode] if (choice=='y' etc) [/icode]. If the if statement is true, the then "statement" is ; and then the program continues with … | |
Re: Post your effort thusfar. Otherwise start with, can you read a file? Can you get input from the user? If you can read from a file, read the two values at the top of it and use those for your subsequent read. Come to us with specific questions. | |
Re: Reading in the integer as a string would probably be the easiest. Take a crack at it and post your attempt, otherwise we will not be able to help you. | |
Re: [quote]Care to share with us where they come from? [/quote] They are Turbo C headers (and/or non-standard ones). It was considered a nice compiler back in 1992. | |
Re: I'm not sure if this configuration is dictated by your assignment, but, in my opinion, I think your circle class should have a point member ("composition") instead of deriving from the point class. What you are seeking is more of "has-a" relationship ("a circle has a point(center)") instead of an … | |
Re: Have you covered scanf in class? (arguably you should use a fgets/sscanf pair, but I don't know if you've learned those yet) Read in an integer value using scanf(call it n_user or something) and replace that hard coded 5 that you have there with n_user. | |
Re: I don't know if this was the intention, but perhaps make a copy of the queue and pop all of the elements off? (no warranty granted on this one lol) | |
Re: In 42 through 47, you never subtract off the part of the number that was just added to the string, so number is still = 467, which is greater than 9 so your last if statement gets skipped over. | |
Re: Sounds quite feasible to me. What's the problem? It'd be a bunch of radiobuttons and groupboxes, presumably. | |
Re: What do you propose that lines 64-68 are doing? You've got a mismatch with your braces, too. I think you're best off doing some reading or tutorials first, plan out your code with pencil and paper, and then do the coding. | |
Re: [quote]How to craete graphical user interface on windows platform without Qt?[/quote] There are any number of other options: Win32 API, Winforms (C++/CLI), wxWidgets, FLTK, GTK. [quote]MCF is not anymore included in Visual C++ [/quote] MFC is not included with the express edition, but it does come with the full version … | |
Re: Just rewrite the skeleton and copy and paste the old information in [code] if( ) { if() { } //close inner if else { } //close inner else } //close outer if else { } //close outer else [/code] Make little notes like that to yourself to verify you're closing … | |
Re: That's the beauty of it, it will be your word processor, so it can have any functionality that you want. Start off with just a rich text box, which will give you a lot of the editing functions built right in (or start with a plain textbox and add in … | |
Re: Perhaps someone in the Windows forum would be better equipped to answer this (as it seems to be less and less of a C++ problem). If you think that's the case, hit the Flag Bad Post under your name and let a moderator know that's what you want to do. | |
Re: You will need nested for loops: [code] for(over each of the rows) { for(over each of the columns) { [/code] Find a relationship between the columns and the rows. Take another crack at it, and post back with your updated code. | |
Re: Firstly, please use code tags [noparse][code] //code goes here [/code][/noparse] Your function definitions (down below) don't match your prototypes at all. Also, take a look at your assignment and figure out what your functions are supposed to do (you have an uninitialized variable which you divide by a constant, etc., … | |
Re: Please use the code tags. There is still time to edit your post. Click on Edit underneath your name and put the code in [noparse][code] //code here [/code][/noparse]. Also, what is your question? | |
Re: [quote]we can develope a game by using a c language[/quote] Yes, you certainly can. [quote]no it is not solved[/quote] What? | |
Re: What NathanOliver gave you was a link to how to do input from and output to text files. Here's another link in that regard [url]http://www.cplusplus.com/doc/tutorial/files/[/url] It seemed initially like that was what you were asking about. What kind of database would you be interested in? A database is probably overkill … | |
Re: Please post your modified code (since we don't know what changes you made in the interim) with code tags [noparse][code] //code goes here [/code][/noparse] Bear in mind that what your have specified in the class declaration (up at the top) must match the method definitions (the functions below). | |
Re: You need a [icode]break;[/icode] after the code in each of your case statements, else the control of the switch "falls through" to the next choice. Changing the value of loop like makes your code difficult to follow, at least in my opinion. Get some more information on things like functions, … | |
Re: See this for a good overall tutorial: [url]http://www.functionx.com/vccli/index.htm[/url] (the top box and the one marked GDI+ will be useful to you). This tutorial is better than the GDI+ in the one above, but it's written for C#, so you'll have to translate the syntax to C++/CLI [url]http://www.bobpowell.net/gdiplus_faq.htm[/url] | |
Re: [quote]This is in order to get the characters ascii value.[/quote] In a direct fashion: [code] std::string s = "123"; std::cout<<(int)s[0]<<std::endl; //outputs 49 (use your for loop to access all of the characters) the value of '1' [/code] | |
Re: You are comparing character by character, so you need single quotes '\"' (since \" is considered to be one character). Also, since you are comparing a true value with a true value, it will always be true, so the loop will run infinitely (and there's nothing in the loop body … | |
Re: I'd say pilot it as a sticky in a couple of high traffic forums (C++ and PHP come to mind, but not necessarily those). You'll get overlap from many of the other forums anyway, and then you can branch out from there. I agree with Ezzaral, posting anything critical in … | |
Re: Okay, I did it, now what? What have you tried towards the problem? | |
Re: Yeah, he's missing the destructor definition for extPersonType (not to "Me too" your post, but I was just working on seeing if the whole project would compile) | |
Re: I don't think this particular error has to do with the file. [code] TimePiece [] timePiece = new TimePiece[limit] [/code] creates an array with room for Timepiece objects, but does not instantiate the individual objects Around line 27 (but certainly before 33) you need something to the effect of [code] … | |
Re: The +/- accounts for there being 2 points of incidence if the value of the discriminant is greater than 0. If the discriminant is 0, there is one point of incidence (the first part +/- 0 gives the same point). If the discriminant is negative, there are imaginary roots and … | |
Re: I assume you are using Winforms? There's a property of the form called ClientRectangle. It contains the height and the width of the form. Using those values, do a calculation for where to place the upper left corner of the 2nd form. | |
Re: You don't need to make the arrays consist of longs, depending on your implementation and whether your computer is 32/64 bit it may be the same size as an int anyway. Really, you only need a datatype that will hold one digit per index of the array, but stick with … ![]() | |
Re: Sounds like a homework question to me. What do you think the answer is? Someone can then tell you if you are right or wrong. | |
Re: What is not working about it? What output are you getting and what is your expected output? I suspect you are expecting both statements after your for loop to be executed at each step, but in reality only the one immediately following the for loop is executed each time. Put … | |
Re: [QUOTE=WASDted]i'm holding my breath![/QUOTE] Don't do it for too long, you'll turn blue and faint. | |
Re: [QUOTE=Fbody]I don't do anything with GUIs or CLI, but I noticed you are using the compound addition operator to attach the EventHandlers. Maybe I'm missing something, but shouldn't that be the regular assignment operator, not a compound operator?[/QUOTE] The compound operator is used there because it is possible to hook … | |
Re: [QUOTE=MosaicFuneral]Those ads have been doing that for years. Either click on the Software Development button and select your forum from the next page, or install Ad-Block Pro and NoScript.[/QUOTE] ...and/or sponsor for just pennies a day!! ;) | |
Re: You have chosen the wrong kind of project. You need to choose a Win32 [B]Console[/B] Application from the initial menu. Start a new project and copy your code in, you should be good to go. |
The End.