15,300 Posted Topics

Member Avatar for nirveshverma
Member Avatar for thisisanfield.1

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]

Member Avatar for Ancient Dragon
0
93
Member Avatar for GrimJack

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 …

Member Avatar for GrimJack
3
106
Member Avatar for rasheed1982

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 …

Member Avatar for csurfer
0
132
Member Avatar for debasishgang7

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

Member Avatar for Ancient Dragon
0
156
Member Avatar for Ancient Dragon

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&gt1=42007"]this video.[/URL] Its a tutorial on how to cut down a tree :)

Member Avatar for replicajewelry
0
111
Member Avatar for RohitSahni

>>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.

Member Avatar for shashanderson
0
241
Member Avatar for lsbora

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.

Member Avatar for neelamjvis
0
87
Member Avatar for kustrle

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 …

Member Avatar for kustrle
0
107
Member Avatar for pocku
Member Avatar for jephthah

The same thing that happened when you reached 700 posts. Nothing. When you reach 1,000 you will get one of those yellow stars :)

Member Avatar for mahgobb
0
154
Member Avatar for EngneerNitemare

[icode]c = toupper(cin.get());[/icode] Or you could just do this: [icode]cout << toupper(c);[/icode]

Member Avatar for Ancient Dragon
0
415
Member Avatar for VernonDozier

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.

Member Avatar for jbennet
1
646
Member Avatar for VBNick

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, …

Member Avatar for VBNick
0
171
Member Avatar for froggy1976

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, ',' …

Member Avatar for shashanderson
0
1K
Member Avatar for hdquang

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.

Member Avatar for hdquang
0
125
Member Avatar for arasucute

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 …

Member Avatar for Ancient Dragon
0
171
Member Avatar for umairyee

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.

Member Avatar for Ancient Dragon
-1
97
Member Avatar for sheharyar

>>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.

Member Avatar for Ancient Dragon
0
223
Member Avatar for Aamit

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 …

Member Avatar for dipakdesaid
-1
355
Member Avatar for samaru

[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 …

Member Avatar for happygeek
0
2K
Member Avatar for pspwxp fan

>>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 …

Member Avatar for pspwxp fan
0
231
Member Avatar for aumi

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.

Member Avatar for ithelp
0
322
Member Avatar for calypso&noname

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.

Member Avatar for calypso&noname
0
265
Member Avatar for valkerye

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.

Member Avatar for valkerye
0
103
Member Avatar for hkBattousai

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.

Member Avatar for suganyavasudev
0
838
Member Avatar for haven_u

Are you entering them into an integer instead of character array? Yes, then use a series of % and / operators.

Member Avatar for haven_u
0
157
Member Avatar for neithan

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 …

Member Avatar for neithan
0
141
Member Avatar for rishurishu

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.

Member Avatar for Ancient Dragon
0
151
Member Avatar for Gaiety

But note that %i used by scanf() is different than %i used by printf(). For printf(), %i and %d are the same thing.

Member Avatar for Ancient Dragon
1
161
Member Avatar for tifka

Also what assembler because some assemblers have macros that do all (or most) of the grunt work of calling system functions.

Member Avatar for Goalatio
0
316
Member Avatar for Reprise

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 …

Member Avatar for dkalita
0
8K
Member Avatar for Dani

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.

Member Avatar for happygeek
4
534
Member Avatar for Dlearner
Member Avatar for Vineeth K

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. …

Member Avatar for ayoungpretender
-3
228
Member Avatar for jupitertrooper

>>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.

Member Avatar for jupitertrooper
0
132
Member Avatar for Sara Sepehri

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?

Member Avatar for Ancient Dragon
0
21
Member Avatar for madhu_raju76

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 …

Member Avatar for mosanta
0
227
Member Avatar for speedy94519
Member Avatar for BestJewSinceJC
-1
88
Member Avatar for shakunni

[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.

Member Avatar for VernonDozier
0
169
Member Avatar for pritaeas

I think there were server problems yesterday. A few other people had double replies also.

Member Avatar for ~s.o.s~
0
81
Member Avatar for The Dude

DON' CLICK ON THAT LINK. If you do, you will have to reboot your computer.:mad:

Member Avatar for The Dude
0
263
Member Avatar for Grn Xtrm

You have over 200 posts and should have known the rules and that posts are not normally deleted unless they violate DaniWeb rules.

Member Avatar for Grn Xtrm
-2
201
Member Avatar for dkalita

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 …

Member Avatar for dkalita
0
168
Member Avatar for katrine
Member Avatar for C++NOOOB

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 …

Member Avatar for C++NOOOB
-1
132
Member Avatar for Ancient Dragon

[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 …

Member Avatar for vegaseat
0
322
Member Avatar for preet4fun

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.

Member Avatar for puranchandra248
0
2K
Member Avatar for infern0

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 …

Member Avatar for infern0
0
101
Member Avatar for ekun

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]

Member Avatar for Ancient Dragon
0
75

The End.