15,300 Posted Topics

Member Avatar for iRun

See our [URL="http://www.daniweb.com/forums/forum158.html"]Link Exchanges forum[/URL]

Member Avatar for links000000
0
138
Member Avatar for gangsta gama

>>I cant seem to find any good ebooks. Thank you. You probably won't find any free ones either. Authors don't write books for the hell of it. They do it to make money. You will get better books at amazon.com or your local book store.

Member Avatar for gangsta gama
0
130
Member Avatar for Wiki_Tiki

[url]www.codeproject.com[/url] has several printing programs that will show you how to do that. Some are for MFC and some not. That site has hundreds of programs and tutorials covering almost everything Windows programming has to offer.

Member Avatar for Ancient Dragon
0
104
Member Avatar for Wiki_Tiki

MFC only comes with the Standard or better version of the compiler. The Express version doesn't support it.

Member Avatar for Wiki_Tiki
0
134
Member Avatar for raja289
Member Avatar for raja289
0
411
Member Avatar for Nemoticchigga

post code, such here is how it might be done [code] char buffer[512] = "Hello World"; // allocate memory for the new string char* ptr = new char[strlen(buffer)+1]; // now copy strcpy(ptr, buffer); [/code]

Member Avatar for Ancient Dragon
0
101
Member Avatar for ninjaneer

copy the dll into the windows installation directory such as c:\windows and see if that fixes the problem. If it does fix it then you just need to put the dll into one of the paths that is in your PATH environment variable.

Member Avatar for ninjaneer
0
236
Member Avatar for SwiftDeath

The code you posted has several compiler errors that you need to fix, such as lines 76, 79 and 80.

Member Avatar for dwks
0
150
Member Avatar for Clockowl
Member Avatar for dmanw100
Member Avatar for brizhou

>>what's wrong with these 3 codes I don't know -- what do YOU think is wrong with them? As for the second program, the defulat data type of a const is an integer, which has no decimals. So this is how to declare the const [icode]const float taxRate = 0.175;[/icode] …

Member Avatar for doddware
0
118
Member Avatar for Cosa

you need a vector<unsigned int> that contain the offsets for each line. Create that array during the loop on line 24. For each line call tellg() to get the offset. Then you can use that info on line 42.

Member Avatar for Cosa
0
4K
Member Avatar for zebanaqvi

As a beginning you should start at the beginning of your learning, not jump smack dabb into the middle of the lake. Buy a book on introduction to c++ and start studying from page 1, not page 500. The [b]Read Me[/b] threads at the top of this board have lots …

Member Avatar for Nick Evan
0
81
Member Avatar for TheWhite

I would use a c++ library such as DirectX or OpenGL that does all the difficult GUI stuff for games. There are lots of tutorials. c++ is not good at browser stuff, like Java. C# is better than C++, but for browsers java IMO is better than either of them. …

Member Avatar for TheWhite
0
687
Member Avatar for ericglanzrock

[QUOTE=eminemdre166;647498]I currently run a Win98 system at my office and am connected on an intranet. Recently we have installed new Xerox Printers which do not support Win98. In an attempt to backdoor this issue with the software/drivers I was unsuccessful. I recall reading some where about a program that could …

Member Avatar for ericglanzrock
0
176
Member Avatar for n.aggel

You can change the compiler's padding behavior by using some options or pragmas. Microsoft compilers can eliminate padding altogether with [code] #pragma pack(0) // don't pad this structure typedef struct { // blabla } #pragma pack() // revert to default padding [/code] Deleting padding is useful when you want to …

Member Avatar for n.aggel
0
174
Member Avatar for ishaanarora

>>gets(data); [URL="http://www.gidnetwork.com/b-56.html"]Click here[/URL] >>it is not letting me scanf in first code but when i manually take Now how do you expect a program to have keyboard access when its running in the background? Keyboard hits only go to the topmost forground program.

Member Avatar for ishaanarora
0
165
Member Avatar for karang

The reason is that you did not include the correct library. Look up that function in MSDN and it will tell you what library you need. Go to [url]www.microsoft.com[/url] and enter OpenPrinter in its search box, it will give you a list of links. Select the first link in the …

Member Avatar for Ancient Dragon
0
540
Member Avatar for rakeshbk402

That's kind of an ambiguous question, but [URL="http://cboard.cprogramming.com/showthread.php?t=104435"]here is some discussion of the topic[/URL].

Member Avatar for Ancient Dragon
0
188
Member Avatar for Hannahlv

>> char* inputFileName=argv[100]; Huh? Do you pass over 100 arguments on the command line to your program? Not very likely, so that are you trying to do here ?

Member Avatar for Hannahlv
0
232
Member Avatar for The Dude

I had a Ford pinto stationwagon -- the only problem I had with it was that it had no zip, it took a looooong time for it go go from 0 to 50, a snale could beat it.

Member Avatar for vegaseat
0
50
Member Avatar for Christian2011

Create another private function init() (or some other name) that can be called from all constructors [code] class MyFileExtractor{ public: MyFileExtractor(string str) { const int STD_NUMBER_OF_COLMS = 1; //standard number of columns init(str,STD_NUMBER_OF_COLMS); } MyFileExtractor(string str, int n) { init(str,n); } ~MyFileExtractor() {cout << "Destructor " << name << "\n"; …

Member Avatar for Christian2011
0
2K
Member Avatar for cam875

You formed the string incorrectly [icode]ItemFile.open((string)(ItemID+".asw").c_str());[/icode]

Member Avatar for cam875
0
102
Member Avatar for xyzt

[QUOTE=Salem;651860]Plus, the whole static create customers thing just seems wrong to me.[/QUOTE] I agree -- it would be better to allocate an array of Customer objects than to have one object allocate an array of data within that instance [code] int main(int argc, char** argv) { int n=10; Customer* customers …

Member Avatar for Ancient Dragon
0
134
Member Avatar for Dannyo329

[QUOTE=iamthwee;651057]There's nothing to stop a user creating a program called main.cpp which may contain malicious code, then compiling it, and sitting that executable in the same directory as the other executable. So when his other program calls [icode]system("main.exe")[/icode] it would execute the virus/trojan/whatever. In regards to what [icode]format c: /y[/icode] …

Member Avatar for Duoas
0
4K
Member Avatar for flecture
Member Avatar for Ancient Dragon
0
247
Member Avatar for 11silversurfer1

Just use normal file i/o streams such as ifstream and ofstream. If you want to display the usual OpenFile dialog box that lets you select the file you want to open then call [URL="http://msdn.microsoft.com/en-us/library/ms646927.aspx"]GetOpenFileName()[/URL]

Member Avatar for 11silversurfer1
0
157
Member Avatar for qeinar

So you mean [URL="http://msdn.microsoft.com/en-us/library/aa365239(VS.85).aspx"]this function[/URL] ? >>s any way to solve this? Yes, fix the bug in your program.

Member Avatar for qeinar
0
139
Member Avatar for loken

[QUOTE=$dunk$;648090]How about where did the phrase computer bug come from?[/QUOTE] True story -- September 1947, [URL="http://www.jamesshuggins.com/h/tek1/first_computer_bug.htm"]Grace Hooper[/URL] at Harvard University.

Member Avatar for GrimJack
0
106
Member Avatar for sftwr21

[QUOTE=sarehu;650894]OOP is outdated, if you ask me.[/QUOTE] [b][i]Outdated[/i][/b] implies something new and better has come along. Would you care to explain what that is?

Member Avatar for Alex Edwards
0
398
Member Avatar for plike922

Is this a C or a C++ program. You posted on the C board so I can only assume it is C. In that case you need to delete lines 1 and 6, which are for c++ programs only. As for the problem -- the while statement is incorrect [icode] …

Member Avatar for Ancient Dragon
0
92
Member Avatar for klactose
Member Avatar for justinclev

just display a message, such as [code] cout << "Please wait while loading or press a key to exit ..."; while(1) ; [/code]

Member Avatar for 11silversurfer1
0
135
Member Avatar for Wiki_Tiki

[URL="http://www.zdnet.com.au/jobs/resources/soa/10-classic-clueless-user-stories/0,130056675,139239390,00.htm"]Here's [/URL]several classic tech support funnies. Probably all of then are true. A true story that happened to me several years ago -- I walked into a doctor's office and the receiptionist was busy doing everything manually even through there was a computer on her desk. I asked her why …

Member Avatar for Ancient Dragon
0
64
Member Avatar for vadan

use the -I keyboard in makefile to designate additional include directoies [icode]-I/usr/include/mydir[/icode] Similar for library paths, but use -L instead of -I

Member Avatar for Ancient Dragon
0
79
Member Avatar for Wiki_Tiki

delete all those goto statements and replace them with standard C/C++ loop statements. You should consider [b]goto[/b] as a forbidden word. [URL="http://www.daniweb.com/forums/showthread.php?t=118765&highlight=goto"]Here is a thread [/URL]-- Just to short-circuit discussion of something that has already been beaten to death.

Member Avatar for Ancient Dragon
0
129
Member Avatar for zandiago

Those of you who know me also know that I've retired for the third time about a year ago, and after 1 week I went back to work at Wal-Mart. Since I retired my wife and I do many more things together and eat out at resturants a lot more …

Member Avatar for zandiago
0
101
Member Avatar for himsymcpp
Member Avatar for ArkM
0
2K
Member Avatar for sangham

The problem with doing that is the program must duplicate the map when returning it, which can be very costly in both time and resources. A better solution is for main() to create the map object, pass it to Foo() by reference, and then Foo() can fill it in [code] …

Member Avatar for Ancient Dragon
0
75
Member Avatar for OmniX

>>Now I havent tried this yet BUT I dont think php will let me make a 8.5 million length array nor will C++. Depends on the C++ compiler -- most (all) 32-bit compilers will do it but no 16-bit compiler such as Turbo C. An array of 8.5 million integers …

Member Avatar for Nick Evan
0
154
Member Avatar for R0bb0b

The problem is getting people to use code tags, not using the right language. People who don't use code tags will also not use that dropdown.

Member Avatar for nav33n
0
149
Member Avatar for Dike

[QUOTE=Dike;648916]Hello Everyone jus joined DaniWeb and would like to know wat happens here. hope someone replies me at least to put me through the nitty gritty of Daniweb. Thanx[/QUOTE] Welcome to DaniWeb. Just read the Welcome Guide link at the top of the page and you will see a tutorial.

Member Avatar for zandiago
0
52
Member Avatar for qeinar

what operating system and what compiler are you using ? >>i also want the first one deleated.. how can i do this? [URL="http://archives.seul.org/linuxgames/Oct-1999/msg00105.html"]click here[/URL]

Member Avatar for qeinar
0
80
Member Avatar for 2fac323

[QUOTE=2fac323;649998]Ok I solved the problem with the infile data missing the first line when sending to outfile. The line- infile >> gender >> gpa; before the while statement was making it skip a line. I removed that line and replaced the while statement with- while (!infile.eof()) { infile >> gender …

Member Avatar for Ancient Dragon
0
114
Member Avatar for joopdirksen

>>Is this possible? Thanks. Yes -- do it the way you posted in the first code snippet.

Member Avatar for Ancient Dragon
0
82
Member Avatar for flipjoebanana

How about dup stdout, close stdout handle, call the function, then finally restore the stdout handle. [URL="http://wwwcgi.rdg.ac.uk:8081/cgi-bin/cgiwrap/wsi14/poplog/man/2/dup"]see man page for dup function[/URL]

Member Avatar for Ancient Dragon
0
99
Member Avatar for Ccrobinson001

you have some lines out-of-order. 1) move line 28 to line 13. You have to open the file before testing if the open failed. 2) exit the program if the open failed. There is no point continuing. So code exit(1) after the error message. 3) Here is how to code …

Member Avatar for VernonDozier
0
134
Member Avatar for Dameon

>>in the code work, or do I have to do something to it? That is the formula, and i was tryng to make it work with the cod Yes, you will have to modify it to make them legal c or c++ statements. First, you have to know the kind …

Member Avatar for Dameon
0
114
Member Avatar for the_virus

>> It's any posibility that Visual C++ 2008 recognize the old headers? Nope. >> Or there are equivalent new headers instead of the old ones? Nope. But from what I saw on the net you can replace strstrea.h with <iostream> and <fstream>. Probably won't be a neat replacement, but M$ …

Member Avatar for ivailosp
0
168
Member Avatar for pepperc0n

use functions _findfirst() and _findnext() to locate all the file names. [URL="http://msdn.microsoft.com/en-us/library/zyzxfzac(VS.71).aspx"]click this[/URL] [code] struct _finddata_t c_file; long hFile; if ( (hFile = _findfirst("*.dly", &c_file)) == -1L ) cout << "No *.dly files in current directory\n"; else { do { std::string name = c_file.name. input.open ((string)(name + ".dly").c_str()); output.open ((string)(name …

Member Avatar for Ancient Dragon
0
148

The End.