15,300 Posted Topics

Member Avatar for moshw

[QUOTE=moshw;610317]Hi, I'm learning C++ programming and have to write a program that shows how to calculate tax rates for a business tha th as shops in 3 different cities with three different tax rates, using the printf function. Anyhelp I can get is appreciated. Keep in mind I am just …

Member Avatar for Ancient Dragon
0
676
Member Avatar for cookiedianne760
Member Avatar for tubatsimoloi

[QUOTE=tubatsimoloi;592941]Please help me!! I recently finished my C#.Net course, and need to start writing programs. But now the problem is, I honestly don't know where and how to start. Please advise me!![/QUOTE] I hop you mean you want to start writing programs for profit (e.g. professionally). Have you got your …

Member Avatar for Maulth
0
159
Member Avatar for mancmanomyst
Member Avatar for hocuz pocuz

How to save the game depends on how the program is written. Since thre are over a gzillion ways to write a game its impossible for anyone here to tell you exactly how you do it. But lets say your program has two variables that need to be saved and …

Member Avatar for Ancient Dragon
0
261
Member Avatar for WondererAbu

You could use a std::vector, or std::list, or write your own linked list. If that isn't what you want then we have no idea what you mean.

Member Avatar for Cybulski
0
154
Member Avatar for Brent.tc

Don't expect any mod to answer questions via PM -- we don't. Post all questions on one of the DaniWeb boards. And I moved this thread to a more appropriate board.

Member Avatar for Nick Evan
0
226
Member Avatar for jbennet
Re: HAM

Does anyone do that any more? I thought they were made obsolete by the cell phone and satrllites.

Member Avatar for The Dude
0
66
Member Avatar for buddha527

Those ACM links are probably pretty useless to the OP. Not unless he has a Masters or Ph.D. in computer science or something which I doubt.

Member Avatar for jephthah
0
2K
Member Avatar for nasty

To be be frank I think you are about 10 years too late to be starting a new career in computer programming You might be able to find an intro position somewhere but companies will want to hire much younger people with no experience. I actually begam mine when I …

Member Avatar for hayrn
0
151
Member Avatar for gangadhar.in

Sorry for this diversion, but I read the thread title and couldn't help but thik of [URL="http://www.imdb.com/title/tt0085450/"]Dr. Detroit[/URL] movie :)

Member Avatar for ~s.o.s~
0
137
Member Avatar for gogoc

use the time() function if you only want accuracy to the second, of clock() for milliseconds. [code] const time_t MaxTime = 60*60; // one minute timer time_t t1 = time(0); // start the timer bool done = false; while( !done ) { time_t t2 = time(0); // get current time …

Member Avatar for gogoc
0
125
Member Avatar for benasour

OMG am I happy that I use Microsoft Visual Studio. All that makefile stuff makes my head swim. :)

Member Avatar for Duoas
0
1K
Member Avatar for gogoc

Then don't do that :) Don't put any code in the program that accesses the file system. Simple.

Member Avatar for Duoas
0
107
Member Avatar for uk101man

>> I'm more of a visual baic & c# man, and wish my project would let write it in VB or C# This is [b]c++ board[/b]. If you want vb or c# then ask your question there. >>String copsoutput; That needs to be lower-case s on string [icode][color=red]s[/color]tring copsoutput;[/icode] >>to …

Member Avatar for Ancient Dragon
0
102
Member Avatar for gogoc

I would imagine that would depend on the operating system. Under MS-Windows programs can hog all the memory it wants (16-bit programs are restricted to 640K). AFAIK there is no way to restrict usage by a given program.

Member Avatar for gogoc
0
103
Member Avatar for Run.[it]

If you are wanting to contain an array of unique random numbers, then [code] for each element in the array generate a random number search the array to see if the number already exists if not, then add it to the array otherwise, if it was found then go back …

Member Avatar for Run.[it]
0
135
Member Avatar for BethL

[QUOTE=jbennet;609843]when you click agree , its the same as signing a contract. You are legally bound by what you select.[/QUOTE] I'm not so sure about that -- how do they know who clicked on it? At most all they can tell is the ip address of the computer that was …

Member Avatar for jwenting
0
122
Member Avatar for Renoldton

Its just a normal text file, so just use standard stream io on it. Other than that advise its impossible for anyone to tell you more from what little you write. Sort of like walking into an auto repair ship and saying "My car doesn't work can you tell me …

Member Avatar for tesuji
0
141
Member Avatar for daviddoria

[code] struct MyParam_t { vector<double> *myvector1; vector<double> *myvector2; };[/code] Don't do that ^^^^ -- make the struct like you originally thought, see below. [code] struct MyParam { vector<double> myvector1; vector<double> myvector2; }; void fn(void *ptr) { MyParam*p = static_cast<MyParam*>(ptr); for(size_t i = 0; i < p->myvector1.size(); i++) cout << p->myvector1[i] …

Member Avatar for Ancient Dragon
0
107
Member Avatar for SonxQ7

why not just put an int there, and you can juse use RECT instead of initRecArea [code] unsigned int cnt; for (next=45, cnt=48;next<=255;next+=30, cnt++) { OnCreate(hwnd,cs,RECT(205,45,55,20),(HMENU)cnt); } [/code]

Member Avatar for Ancient Dragon
0
116
Member Avatar for hapiscrap

[QUOTE=Salem;609487] Use code=cpp .[/QUOTE] That doesn't work. Needs to be [noparse][code=cplusplus][/noparse]

Member Avatar for Nick Evan
0
123
Member Avatar for heav_yduty

Upgrade to VC++ 2008 or use an earlier version of Access. VC++ 6.0 is no longer supported by Microsoft, and hasn't been for several years now.

Member Avatar for mitrmkar
0
250
Member Avatar for mussa187

you can give it a default parameter of a blank string line 12: [icode] string ip_uri(string ip50, string uri50 = "");[/icode]

Member Avatar for mussa187
0
112
Member Avatar for shankhs

[code] int try(int *add) { if(add()>10) try(sub); } [/code] That does work because the parameter to try() is not a pointer to a function. This should fix the compile error. [code] int try(int (*fn)() ) { if(add()>10) try(sub); } [/code]

Member Avatar for RenjithVR
0
155
Member Avatar for e_pech

see [URL="http://www.codeproject.com/KB/docview/replacingview.aspx"]this article[/URL]. You should bookmark that site because it has a wealth of MFC code that you can freely use.

Member Avatar for e_pech
0
431
Member Avatar for Jennifer84

If its already in std::string then use stringstream [code] #include <sstream> ... ... char Comma; std::string LineDummy; std::string text; int one = 0; int two = 0; std::string MainLine = "Hello,1,2"; stringstream str(MainLine); getline(str,text,','); str >> one >> Comma >> two; cout << text << " " << one << …

Member Avatar for Ancient Dragon
0
93
Member Avatar for Black Magic

put the numbers in an array [code] int array[3] = {3,1,5}; int largest = array[0]; int smallest = array[0]; for(int i = 1; i < 3; i++) { if( array[i] > largest) largest = array[i]; // now do similar for smallest } [/code]

Member Avatar for n.aggel
0
151
Member Avatar for Salem

I don't recall seeing that problem, just [URL="http://www.daniweb.com/forums/thread124648.html"]the one I reported.[/URL] Maybe the two are related ????

Member Avatar for Dani
0
136
Member Avatar for ohhmygod

[code] for(i=0; i<M && !fp1.eof(); i++) { for(j=0;j<N !fp1.eof();j++) { fscanf(fp1," %f", &a[i][j]); } } [/code] or something like this [code] i= 0; j = 0; while( fscanf(fp1," %f", &a[i][j]) > 0) { j++; if( j == N) { j= 0; i++; } } [/code]

Member Avatar for Ancient Dragon
0
192
Member Avatar for Cybulski

My guess is that neither of those loops will work. 1) how is iter_vsDirectory initialized? You failed to post it. 2) what is the purpose of that first loop with the iterator ? The iterator doesn't appear to be used anywhere within the loop. Adding more strings to the end …

Member Avatar for mitrmkar
0
354
Member Avatar for grommet2481

If you are using cout then you can use setw() [code] #include <iostream> #include <iomanip> using namespace std; int main(int argc, char* argv[]) { cout << setw(10) << "Hello"; return 0; } [/code]

Member Avatar for grommet2481
0
93
Member Avatar for monstro

There is no difference between structures and c++ classes other than default access. Unions are the same as they are in C -- all members of a union occupy the same memory location. >>classes and their associated components are instantiated in memory in pretty much random order, but structs and …

Member Avatar for Duoas
0
186
Member Avatar for kashi_787

If it worked in Turbo C it was because you were lucky. [b]header[/b] is an unallocated pointer. Since it is in global space the pointer's value is initialized to 0 during the program's startup code, which is executed before main() is called. The program crashes because you need to call …

Member Avatar for jephthah
0
144
Member Avatar for noraantonia
Member Avatar for mitrmkar
0
191
Member Avatar for Jennifer84

Convert the dates to time_t using struct tm in <ctime> then you can easily compare the two dates without any problems. Or, you can rearrange the date so that they are in the form YYYY/MM/DD then you can use normal string comparisons on the dates. >>So is it possible to …

Member Avatar for Jennifer84
0
580
Member Avatar for CoolGamer48

I never use the else in a statement like that. But there really is nothing wrong with it because a good optimizing compiler will probably delete the else anyway.

Member Avatar for Salem
0
144
Member Avatar for Aamit
Member Avatar for marco93
0
194
Member Avatar for picass0

>>wat i wanted is that it if the row binary wif the bits Stop writing like this is some chat room. It isn't. Spell out the words.

Member Avatar for Radical Edward
0
92
Member Avatar for xyster

[QUOTE=xyster;608806] I wrote this intending it to be either able to swap a structure, or just the data defined within a structure. Will the swap function be able to do this, because.. when i tested it, it seemed to fail. but i didnt except it too. [/quote] It fails because …

Member Avatar for xyster
0
103
Member Avatar for Zavani Nixon

>>Could it be compatability issue btn Vista and Visual 6.0 Yes. Toss that compiler out and upgrade to VC++ 2008. The Express edition is free, but doesn't support MFC.

Member Avatar for Ancient Dragon
0
236
Member Avatar for spirals

I think the process that creates the shared memory must stay alive until all other processes are done using it. When the creating process dies the os deletes the shared memory. [URL="http://www.cs.cf.ac.uk/Dave/C/node27.html"]Here is a description for Solaris[/URL], which is probably identical to the work I've done with IBM unix. But, …

Member Avatar for spirals
0
108
Member Avatar for The Dude
Member Avatar for jephthah
0
263
Member Avatar for majestic0110

[list] [*]Eating ice cream for 24 hours without gaining weight. [*]Learning to play a musical instrument such as piano in 24 hours. [*]Spend the day at a health club without getting too exhausted. [*]Be the President of USA for a day. [*]Fly to UK and spend the day in London. …

Member Avatar for sneekula
0
262
Member Avatar for kako13

[code] if ( !fout.fail() ) { // if began fout << p->Objperson.nombre << endl; fout << p->Objperson.ss << endl; fout << p->Objperson.edad << endl; } // if end [/code] That should be a while loop. Also your program will be a little more efficient if you do not use endl …

Member Avatar for kako13
0
148
Member Avatar for rolic

[URL="http://www.google.com/search?hl=en&q=online+university+degrees"]see these google links[/URL]. Make sure whatever you decide to do that the course(s) are accredited. Talk to your school counseler about whether the courses are transferrable or not because many of them are not unless you get the bachelor's degree with that institution.

Member Avatar for Ancient Dragon
0
29
Member Avatar for guest7

line 8: you might as well delete it because the compiler will delete it when you compile the program for release mode. Instead of using assert, just test as normal [code] if( !foud.is_open()) { // open failed } [/code] line 10: don't use eof() like that because it doesn't work …

Member Avatar for Ancient Dragon
0
108
Member Avatar for shadowfire36

look at line 13 of the *.cpp file then compare it with line 30 of the header file. The first parameter of the function in the *.cpp file does not match the parameter in the header file. Also, the cpp file must declare the class name [code] void [color=red]Football::[/color]SearchMatches(Match* matches,int …

Member Avatar for Ancient Dragon
0
156
Member Avatar for help22222

How exactly does the code you posted attempt to solve the problem ? Answer: it doesn't -- the code is for a completly different homework problem. Do the requirements one at a time. Your first task is to create a structure that contains three items: last name, first name, and …

Member Avatar for Ancient Dragon
0
310
Member Avatar for etc123

[QUOTE=The Dude;601067]Hehe thought other things @ first :D (Then realized the staff would hit clicked DELETE THREAD if it was that) Very nice regardless........[/QUOTE] I did just that, then realized what it was about so I undeleted it.

Member Avatar for jephthah
0
167

The End.