15,300 Posted Topics
Re: >>where it rains on your desktop Huh! You aren't supposed to set your notebook out in the rain :) I had to get a new video card about a year ago for similar reason -- the game I wanted to play didn't work very well because it was too slow. … | |
Re: [URL="http://www.winprog.org/tutorial/"]windows tutorial[/URL] >>The problem is that I can write a programme in C and then run it but it does not produce an .exe It won't if there were compile errors. Make sure your program compiles iwth 0 errors and 0 warnings. | |
Re: I saw that a couple times this morning too. The last time I saw it Dani said it was a corrupt file. But she probably won't do anything about it until after she upgrades DaniWeb to the newest version of vBulletin, probably sometime Christmas Day. | |
Re: assume [b]customer[/b] is a string and [b]balance[/b] is an integer then just loop through the file until the [b]customer[/b] is found. The loop will stop after all the file has been read. [code] while( myfile >> customer >> balance) { // blabla } [/code] | |
| |
Re: So where is [b]get_current_dir_name()[/b] defined? Functions must always be declared before they can be used. Since the C compiler does not know any better it will assume the fucntions returns an int, and that is not what the fprintf() statement expects as the parameter. The solution is to prototype it … | |
Re: If you want to pass the name of the file to your program at runtime then just add the filename on the command line when you run your program. [icode]c:\myprog.exe file1.txt <Enter>[/icode] Then your program can use the arguments to main() to get the filename [code] int main(int argc, char* … | |
Re: Please read the rules and information in my signature. We do not do your homework. | |
I saw on TV just a few minutes ago that the Queen (UK) has her own website but they didn't give the URL. I guessed [url]www.royalfamily.uk[/url] but that wasn't it. Anyone know what it is ? | |
Re: Yes, you need to add more comments -- everywhere. First you need an explaination at the top of the program to tell us what the program is supposed to do. Even "glancing" at main() I don't know what it is trying to do. If in doubt -- comment it. | |
Re: you have to make the function yourself. Is it a GUI program? If it is then just make a dialog box with the login information. If not then just print out the text and get input just like any other console program. The more difficult part will be how to … | |
Re: >>This, was working till i changed the input style. From gets to cin.get [b]gets()[/b] was wrong to begin with. and cin.get() does not do the same thing as gets(). What you probably wanted was cin.getline() or std::getline(). BTY I fixed up the code tags in your post. [noparse][icode][/noparse] is intended … | |
First snow of the winter for us, but we only have about 1 inch. :) I like to see a white Christmas, but don't like the suff at other times because its such a pain to remove from sidewalks, roads etc. I know most of you young people have lots … | |
Re: Read the [b]Read Me[/b] threads at the beginning of this board because they contain a wealth of information about books, compilers and other related resources. | |
Re: First, thanks for taking the time to read the rules about code tags :) >>By the way, how come code tags aren't working properly... Shoulden't this be numbered now you have to add the language like this: [noparse] [code=c++] // your code here [/code] [/noparse] >>Unfortunately, when I use this … | |
![]() | Re: [QUOTE=jbennet;467751]Dont get 64. 32 has more drivers for it, 64 is very buggy and has limited drivers[/QUOTE] Yes I agree. I tried 64-bit just long enough to find out that I couldn't find a video driver. So I went back to 32-bit os and tossed the 64-bit CD into the … |
Re: [QUOTE=scru;481620]. I really hope it's not a sign of something messed up with our tectonic plates. [/QUOTE] No -- its just the coming of the [URL="http://www.daniweb.com/forums/thread92901.html"]end of the world in 2012[/URL] :) | |
Why does the list include posts that I made just a few minutes earlier? Shouldn't those not appear in the list ? | |
Re: There's probably at least a couple ways to do it. 1) read the entire master file into an array of structures or classes, then for each row in the transaction file search the array for the master record. If the master record is found then update it. If no master … | |
Re: >>I want to know how ti make it show a playng card instead of the image. But ... a playing card IS an image, its just a specific kind of image. Probably all you have to do is create a bitmap of a card then use it in that program … | |
Re: what does fstream have to do with calculating the area of a triangle? The area is a mathametical operation, not a file operation. How would you find the area of a triangle using pencil & paper? Then do it the same way in a C or C++ program. | |
Re: what makes you think you can compare integers and strings ? Ain't going to work. If the strings contain numeric digits then convert them to integers before doing the comparison. | |
Re: Your problem might be [URL="http://blogs.msdn.com/vcblog/archive/2007/10/12/how-to-redistribute-the-visual-c-libraries-with-your-application.aspx"]this:[/URL] Also, make sure you compile the program for Release and not for debug. >>The way I am compiling them is by clicking the green arrow (But, the mouse tip says its called "Start Debugging" No. To compile select menu Build --> Build Solution. Or hit … | |
Re: Get yourself an Introduction To c++ book and start reading/studying from page #1. If you don't know how to do simple file stuff then there is no way you will be able to encode a file. Read the [b]Read Me[/b] threads at the top of this board for a wealth … | |
Re: [URL="http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c9855/"]tutorial[/URL] | |
Re: My age group would consider it total crap. But that's what my parents thought about our music too :) | |
Re: pretty simple really, just call mkdir() for each directory in the tree. | |
Re: You created the wrong kind of project. To create a console project, select menu File --> New --> Project --> then select the Console Application icon. | |
Re: And another term I've seen floating around is "[URL="http://www.bls.gov/oco/ocos267.htm"]software engineer". [/URL] | |
Re: Not sure what you mean. Do you want to create a function that is called by the operating system every few seconds ? That would depend on the operating system. I know its possible in MS-Windows programs but I don't know about other operating systems such as *nix. If that … | |
Re: >> char filename, filename2, word[20]; You are attempting to tread [b]char[/b] as if it were [b]std::string[/b]. My suggestion is to get rid of those c-style character arrays and use the easier-to-use std::string instead [code] std::string filename, filename2, word; ... cout << "Enter your output filename"; getline(filename2,cin);//allow filename to contain spaces … | |
I discovered this just a few minutes ago that if a very long text with no spaces is gets cut off. Does this in all tags, code, quote, and untagged. The only way to make it work right is to manually put a C/R at some place. I would have … | |
Re: [icode]sizeof(int*)[/icode] returns the size of a pointer, while [icode]sizeof(int)[/icode] returns the size of an integer -- the two are NOT the same. And the lines you quoted are not the same either. Example: assume [b]nrows[/b] = 10, [b]ncols[/b] = 5 and [b]sizeof(int) = 4. The first equation is [b]10 * … | |
![]() | Re: Use the clock() function. Create a loop and display the next character in the string when the current value of clock minus the original value is >= 25 [code] clock_t t1, t2; t1 = clock(); while more characters to display if clock() - t1 > 25 display a character set … |
Re: see [URL="http://msdn2.microsoft.com/en-us/library/ms725473(VS.85).aspx"]these time functions[/URL] | |
Re: [QUOTE=CezzaXV;495065]Basically, I need to program a class which will connect to a MSAccess database. I'm using Visual Studio 2005 and C#. I'm really at a loss for what to do. I've looked at online tutorials but they all seem like gobbledygook and I don't understand ANYTHING about them! [/QUOTE] Post … | |
Re: Probably start research [URL="Used the console window as the main window because my application also console based application."]here.[/URL] | |
Re: You could start to learn MS-Windows GUI programming. [URL="http://www.winprog.org/tutorial/"]Tutorial here.[/URL]. | |
Re: CreateWindowEx does not throw an exception on error so there is no point to the try/catch block. If the function fails then you have to call GetLastError() to find out the error number, and you can pass that to FormatMessage() to get a human-readable error message. I don't think you … | |
Re: It means -- do not ask us to write your programs that your teacher/instructor assigned to you. You won't learn anything if I write it so I will not. But we are more than willing to help YOU write the program yourself. But remember, we are all volunteers and none … | |
Re: you need to define them within the header file [code] template <class Type> class openadd { protected: virtual int HashFunkcija(const long& item) const = 0; Type **Element; int TableSize; Type DefaultItem; public: openadd(int TableSize=100); openadd(Type DefaultItem, int TableSize = 100); ~openadd(); bool Store(const Type& item) { int index = HashFunkcija(item.GetPhone()); … | |
Re: Yes VC++ 2005 Express is free but it does not contain a code wizard that generates GUI code other than a bare shell with pure win32 api functions. It doesn't let you work with windows like VB does. If you want VB type wizards then Borland C++ builder is probably … | |
Re: >>You're a man after my own heart. what makes you think Narue is a man ??? :) | |
Re: [URL="http://www.developer.com/net/vb/article.php/1539541"]tutorial[/URL] | |
Re: If I had to choose something it would be to remove everything in iostream and fstream IMO it is clumbsy and difficult to learn/use. | |
Re: >>'hardware' : undeclared identifier where did no define [b]hardware[/b] ? You can ignore that second error message because it is related to the first one. >>Is there a better way to do this? Fix the error? | |
Re: >>What I'm wondering is that how come it matters which specific bit is turned on or off? And where would it be implemented in everyday use programs? Its often used to pack booleans in one integer. Suppose you are working with several led lights attached to a serial port and … | |
Re: [URL="http://msdn2.microsoft.com/en-us/library/ms632620.aspx"]WM_DESTROY[/URL] [URL="http://msdn2.microsoft.com/en-us/library/ms632617(VS.85).aspx"]WM_CLOSE[/URL] | |
Re: >>qsort(array[c], length, sizeof(int), compare); that is incorrect. You are sorting an array of char pointers not an array of integers [icode]qsort(array, c, sizeof(char*), compare);[/icode] Your compare function is also wrong. Why are you converting the char pointers to integers? I thought the strings are words? All you need is this? … | |
Re: First you have to find out how many comma-separated words are in the string. Iterate through the string and count the commans. Then allocate the int array large enough to hold that many integers. After that, go through the string agsin, this time when you find a comma set one … |
The End.