15,300 Posted Topics
Re: [URL="http://www.gidnetwork.com/b-61.html"]system("pause")[/URL] | |
Re: struct (or class) students needs an array or vector to hold the individual shares and their quantities. [code] struct shares { string name; int qty; }; struct students { vector<shares> sh; // remaining fields }; [/code] | |
Re: That is awesome :) Just think -- it will put all the book publishers out of business, and all those employees who run the printing presses and distribute the books out of work. Why stop with books -- include newspapers and magazines too. The book store of the future will … | |
Re: in c++ create a vector<int>, sort it, then print the 3d number. Otherwise I have no clue how to do it without comparison operator. [code] vector<int> array; array.resize(3); // populate the array with 3 random values array[0] = rand(); array[1] = rand(); array[3] = rand(); // sort sort(array.begin(),array.end()); // display … | |
Re: I would recomment you learn wxWidgets -- its a lot easier to learn than pure win32 api and its portable between MS-Windows, *nix and probably MAC. AFAIK it doesn't require .NET. >>.It must be easier than C++. LMAO | |
If you have been on MSN.com you may have already seen [URL="http://video.msn.com/?mkt=en-us&vid=b14d7a37-577a-498c-9345-86f516011832&playlist=videoByUuids:uuids:bbb5a657-3059-488e-9134-4d88bdddfe32%2C42ffc9f1-ab13-4d1e-b598-9fb9a9ffcd1e%2C70c6ab5d-53ff-47a8-8478-6769c618ee54&from=MSNHP&tab=m3>1=42007"]this video.[/URL] Its a tutorial on how to cut down a tree :) | |
Re: >>also i am using GUI You mean the compiler is has a GUI interface ? I think you will probably have to use the curses library. | |
Re: depends on the image files. If they are truly text, such as a scanned document, then you will need some sort of image recognition program. | |
Re: You will need to make three dialog boxes, one for each of the three windows. Each dialog box should nave a Previous and Next button in addition to the text and edit controls. After getting that done you can write the c++ code that makes all that work. If you … | |
| |
Re: The same thing that happened when you reached 700 posts. Nothing. When you reach 1,000 you will get one of those yellow stars :) | |
Re: [icode]c = toupper(cin.get());[/icode] Or you could just do this: [icode]cout << toupper(c);[/icode] | |
Re: Josh would be ok if he would learn to control his fowl mouth. [url]www.f***france.com[/url] would be a site he would enjoy. | |
Re: I don't have that registry key, so I used a different one. This works [code] int _tmain(int argc, _TCHAR* argv[]) { HKEY hKey = 0; TCHAR buf[255] = {0}; DWORD dwBufSize = sizeof(buf)/sizeof(TCHAR); if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\DirectX"), NULL, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS) { MessageBox(0, TEXT("Can't open key."), NULL, MB_OK); } else if(RegQueryValueEx(hKey, … | |
Re: delete lines 13 and 22 because they are unnecessary global variables. line 133: why is it reading just the first word on the first line of the file? Here is how to read that file [code] // read until end-of-file while( getline(name, inMyAddress, ',') ) { getline( street, inMyAddress, ',' … | |
Re: Is the class you posted really what you have on your computer??? Or did you just type it into your post from memory? Use copy/paste to copy the program into the clipboard then paste it into your post. What you posted above is useless to us. | |
Re: put that picture in code tags and it will keep the spaces. All you need to do is write the function with two simple loops. The outer loop counts the rows and the inner loop counts the columns. Then inside the inner loop call putchar() or printf() to print an … | |
Re: You are apparently in the same class as [URL="http://www.daniweb.com/forums/thread230404.html"]this guy[/URL]. Why don't you two get together and discuss the problem. | |
Re: >>Am I doing it right? Maybe. Does it do what the requirements state? The program needs a switch statement so that it can process each of the menu items. | |
Re: It's a bit like how to read a file, but you're going to read the windows registry. First you have to call RegOpenKey() to get a handle to the registry key entry, and then RegQueryValueEx() to acaully read the key entry, finally RegCloseKey(). You can find all those functions, and … | |
Re: [quote=yaredo;363762]I want some advise. Is it necessary to be a mathmatician to be a programmer.[/quote] You don't need to be a mathematician unless of course you work for a company like NASA. But you do need to know college algebra and trig. Never needed anything else in over 25 years … | |
Re: >>so i decided that i'm fed up of VC++. It was throwing me lots of stupid errors. LMAO :) :) The errors are reported for a purpose -- because you wrote a buggy program. There are some warnings about depreciated standard C functions, but you can easily disable those warnings … | |
Re: What part(s) of the program don't you know how to write? Sorry, but waiting until the very last minute to get help is not good for your grades. You need to post the code you have written and ask specific questions. We won't write the program for you. | |
Re: line 21 is declaring a new integer and hiding the variable you declared on line 12, and that is the one the compiler is complaining about. Rewrite that line like this: [icode]for (counter = numExs; counter>0; counter--) [/icode] then delete line 19. | |
Re: You are confusing the assignment operator = and the boolean operator ==. line 46: use == operator, not the = operator. Similar problem in other lines of code at lines 60-69. [icode]if (leap == true)[/icode] lines 32, 41,49, and 53: use = assignment operator, not == boolean operator. | |
Re: why not just have one button and toggle its title between start and stop. Inside the button's event handler get the button's text, if its start change it to stop and do the start function, otherwise if its stop change it to start and do the stop function. | |
Re: Are you entering them into an integer instead of character array? Yes, then use a series of % and / operators. | |
Re: Line 4 is initializing the vector to have longitud number of elements. Each push_back() will add another item to the end of the vector, which will increase the vector size. You don't want to use push_back() if you initialize the vector like that. Just use [] operator [code] for (unsigned … | |
Re: Read the programmer's manual that came with the touch screen. If you don't have one then contact the manufacturer -- probably download from their web site. | |
Re: But note that %i used by scanf() is different than %i used by printf(). For printf(), %i and %d are the same thing. | |
Re: Also what assembler because some assemblers have macros that do all (or most) of the grunt work of calling system functions. | |
Re: binary files are called "binary" for a reason -- they contain the computer's internal representation of the data, not something us humans can easily read. When your program reads the binary file back into the structure, then print out the values (or view them with your debugger), you should see … | |
Re: I like to look at threads with no replies to see if I can help. Making the 0 in bold red helps to quickly locate them, even though there is the "Unanswered Threads" link. | |
Re: Technology and lack of physical exercise are the biggest contributors to why Americans are so fat. Just watch Biggest Loser and you will see men and women who weight 400+ lbs! Americans are so fat because they sit on their ass so much watching tv or playing on their computers. … | |
Re: >>My problem is I don't know how to ignore all characters after the first Use getline() to get the entire string from the keyboard, then follow Vernon's suggestion. | |
Re: I have not had a problem with it. [URL="http://www.dreamincode.net/forums/showtopic127959.htm"]Tutorial here[/URL]. Have you set the database up in the ODBC driver? | |
Re: A DLL is a collection of code that is shared among several programs. Instead of duplicating that code in every program people put the code in a DLL so that every program can use it. The operating system running on your computer is a very good example -- the installation … | |
Re: We don't do your homework for you. What exactly do you want help with. | |
Re: [URL="http://www.cplusplus.com/reference/iostream/fstream/"]fstreams[/URL]. Also google for fstream tutorials. ifstream is for input files, ofstream for output files. With a little practice its not all that hard to do. Exactly how to do it will depend on file contents -- post a couple lines from the file. | |
Re: I think there were server problems yesterday. A few other people had double replies also. | |
Re: DON' CLICK ON THAT LINK. If you do, you will have to reboot your computer.:mad: | |
Re: You have over 200 posts and should have known the rules and that posts are not normally deleted unless they violate DaniWeb rules. | |
Re: Are you talking about *.doc files generated by Microsoft Word? I've never tried it but I can imagine it would be extremly complex to do outside MS-Windows and MS-Word. There is also Open Office that produces *.doc files, but they are not quite as complex as MS-Word. You might start … | |
| |
Re: You mean something on the order of this: [code] #include <iostream> #include <string> using namespace std; class A { public: A() {a = 0;} void common_interface() { cout << "class A\n"; } protected: int a; }; class B { public: B() {b = 0;} void common_interface() { cout << "class … | |
[quote][sarcasm] WASHINGTON—President Barack Obama held a nationally televised address Tuesday to "clarify any misunderstandings" about his health care proposal, assuring Americans that under the new bill senior citizens—and not the federal government—will have the right to choose how they are executed. "Let me dispel these ridiculous rumors once and for … | |
Re: If the account balance is 0 my guess is that the account should be closed and just delete it. That would probably indicate the person withdrew all the money so that he could go buy a new computer and is no longer interested in putting his money in your bank. | |
Re: Average: sum of all the numbers entered divided by the quantity of numbers entered. So if I enter 5 numbers (1, 2, 3, 4 and 5) the average will be (1+2+3+4+5)/5. You need to do the same thing in your program. Just keep summing them up as you enter the … | |
Re: create a loop then prompt to input each of the fields. [code] for(i = 0; i < 5; i++) { printf("Enter id ...\n"; fgets( s[i].id, sizeof(s[i].id), stdin); // etc etc for each of the fields } [/code] |
The End.