15,300 Posted Topics
Re: [URL="http://msdn.microsoft.com/vstudio/express/visualc/"]VC++ 2005 Express[/URL] [URL="http://www.bloodshet.net/"]Dev-C++[/URL] [URL="http://www.turboexplorer.com/cpp"]Turbo C++[/URL] just to name a few :) | |
Re: >> What do they contain after executing a nonarithmetic instruction such as MOV The same thing that it did before the instruction. >>What if there was an arithmetic operation in a nonarithmetic instruction Don't know -- but you could use a debugger to find out. | |
Re: what you are doing is attempting to print the binary value of the number. It has to be converted to ASCII before it can be printed. If you look at an [URL="http://images.google.com/imgres?imgurl=http://www.carouseldesign.com/ASCII_Chart.gif&imgrefurl=http://www.carouseldesign.com/ASCII_Chart.html&h=497&w=429&sz=19&hl=en&start=3&um=1&tbnid=8DlHsE9r25sgeM:&tbnh=130&tbnw=112&prev=/images%3Fq%3Dascii%2Bchart%26svnum%3D10%26um%3D1%26hl%3Den%26sa%3DX"]ascii chart[/URL] you will see that the ascii value for '0' is 48 decimal, or 30H. So if you … | |
Re: win32 api does not have equivalent of fgets(). It only has like fread() and fwrite(). You are much better off by sticking with standard C functions in stdio.h or use c++ functions in <fstream> | |
Re: forget about VC++ 6.0 -- its too old and does not meet c++ standard very well, and sometimes not at all. Get VC++ 2005 Express (free) instead. | |
Re: line 5: [b]swap[/b] should not be an array but a simple integer, like this: [code] int swap = matrix[m][k];[/code] then line 8: [code] matrix[m+1][k] = swap; [/code] and don't forget to change line 9 too. | |
Re: >>my compiler behaves abnormally :scared: what does it do ? blow up or something very nasty ? | |
Re: The way I did it was subclass CEdit then enable the OnPreTranslate() function. In that function you can check if the key is the <Enter>, and if it is just return (I think TRUE) so that it gets ignored. I don't have a compiler with MFC to verify, but should … | |
Re: My guess is that you are passing the wrong data types to the function probably for the first parameter. Make sure the first parameter is [b]unsigned int[/b] and not something else. >>When I run the program I get this No you don't -- you will get that error at compile … | |
Re: >>are void and int only 2 declarations for main void is [b]never ever[/b] a valid declaration for main(). ALWAYS declare it as returning int. add this between lines 2 and 3 of your program [inlinecode]float square ( float x);[/inlinecode] It will tell your compiler about that function. | |
Re: Please turn off that caps lock key -- IT ISN'T NECESSARY TO SCREAM AT US. | |
Re: If we were going to impeach Bush it should have been done 5 years ago when he first illegally invaded another sovern nation. And should have impeached the entire Congress for letting he do it. Too late now. The next President will have a huge job straightening that mess out. | |
Re: we have a board for [URL="http://www.daniweb.com/forums/forum55.html"]website reviews[/URL]. Please post there. And Welcome to DaniWeb. | |
Re: [b]endl[/b] puts '\n' in the file then causes the output stream to be flushed to disk. The interpretation of '\n' depends on the operating system and whether the output file was opened in text mode or binary mode. Are you attempting write the file out on *nix operating system then … | |
Re: >>I'm not interested in even risking downloading a non-portable file format which is prone to all sorts of virus infections Absolutely agree with that -- *.doc files have been known to contains viruses, worms and other kinds of animals. Kg: save your program as *.c and either post it or … | |
Re: There are hundreds of free examples on the net, just google for "odbc c libraries". [URL="http://www.sqlapi.com/"]Here[/URL] is just one of them Or why not just compile the code you posted in your other thread? | |
Re: line 29: open() wants a const char* for the filename and you passed a std::string object. I'm supprised your compiler did not object and spew out some nasty error messages. It should be this: [inlinecode]in.open(inFile.c_str());[/inlinecode] line 39: unnecessary -- if open() failed the stream can not be closed. line 73: … | |
Every time I click on a thread the browser's (IE7) horizontal scroll bar is placed at the far right and I have to move it back to far left so that I can read the post. It doesn't happen at other websites -- just DaniWeb and I've only noticed the … | |
I just came across this interesting article in our local electric coop newsletter, and found an online source [URL="http://www.geocities.com/aloha3003/PoemsBiggestMiracle.html"]here.[/URL] [quote] Moses and the people were in the desert, but what was he going to do with them? They had to be fed, and feeding 2 or 3 million people requires … | |
Re: Of course you can crate GUI programs with c++. The entire MS-Windows api is written in C and C++. Also I bet the *nix GUI is also C/C++. >> can now say i am a c++ programmer Probably. Have you learned everything there is to learn? Definitely not. You will … | |
Re: >>[b][i]a simple c code[/b][/i] which will run when ever we plug in the usb drive :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: :icon_lol: | |
Re: I could care less what my African name is -- I'm not from Africa so it doesn't matter. | |
Re: lines 16 and 17 need to be reversed because they are in the wrong order. You have to display the question on the screen before you expect someone to enter the answer on the keyboard. who gave you that code snippet? I sure hope it was not your instructor, because … | |
Re: start [URL="http://www.daniweb.com/forums/thread50370.html"]here[/URL] | |
Re: >>“Write a C++ program (use multi-dimensional arrays) that uses an array structures Where have you declared the structure ? and where did you declare the array? You need a structure something like this: [code] struct company { std::string company_name; long Quarter_sales[4]; long Total_annual_sales; long Average_quarterly_salesl }; [/code] lines 45 and … ![]() | |
Re: >>how do i use the data for just the year only not the whole input? convert the last four characters of the string to an integer. There are several ways to do that but the simplest is to call atol() [code] std::string date = "07/05/2007"; int year = atol(&data.c_str()[6]); [/code] ![]() | |
Re: I have a cat named -- "Cat". They don't respond to names anyway so why bother with giving them cute names. My cat, a male, is the lazyest cat I have ever seen -- I have to catch the mice and give it to him! He was neutered, so maybe … | |
Re: >>can u tell me wats the problem First you need to learn how to format your program better. What you posted is absolutely terrible! Take the time to use the space-bar on your keyboard and make your program easy to read. You will probably get a better grade for it … | |
Re: read [URL="http://wxdsgn.sourceforge.net/faq.php"]this FAQ[/URL] and read their tutorial | |
Re: 1. its not necessary to prototype main() as you did in line 8 because main() is defined by c standards and can not be called anywhere else in your program. 2. delete the unnecessary brace on line 79 because it serves no useful purpose. 3. line 76 >>int DrinkArray[0] = … | |
Re: Read [URL="http://www.daniweb.com/forums/thread84893.html"]this discussion[/URL]. Rep is no longer valid in Coffee House, which includes Geek's Lounge. | |
Re: after line 65 you should clear the prson array by setting everything to 0 -- you can use memset() to do that very quickly [code] memset(prson,0, sizeof(prson)); [/code] to search for a given person you will, of course, first have to ask for the person's first and last names. Then … | |
Re: you will probably want to create a structure to hold the information for each student, something like this: [code] struct student { char name[80]; int grades[10]; } [/code] Now you will have to declare an array of 5 of those structures. Then create a loop that prompts for student name … | |
Re: I believe you are correct -- there have been several law suits about that here in US. But I think you should contact a lawyer in your country soon to find out the legality there. | |
Re: Did you ever get the compatability warning when you start any of those screens ? Most likely the games can't be run on Vista. | |
Re: why are you reading the file? All you have to do is call fseek() to move the file pointer to the end of the file then call ftell() to get the file size. Another way is call fstat() which returns the file size in a structure. >>How much size of … | |
Re: That is wrong anyway. Are you using VC++ 2005 compiler ? If so, then to add a library to the project press Alt + F7 keys and the Property Pages dialog box will appear. Expand [b]Configuration[/b] Properties, then expand [b]Linker[/b], select the [b]Input[/b] category under Linker. Then on the right … | |
Re: convert them to doubles using SystemTimeToVariantTime() then its trivel to compare them. | |
Re: >>I think malloc allocates 8 bytes of unused space with this, beacuse size of *p is 8 bytes in my system No it isn't. The asterisk tells sizeof operator to evaluate the size of the object to which the pointer points and not the size of a pointer itself. In … | |
Re: line 11: when declaring the array you have to tell it how many items the array will contain. For example, if you want the array to contain not more than 10 names then declare it like this: [code] string names[10]; [/code] Declaring dynamic arrays is also possible, but apparently your … | |
Re: The values in those if conditions (line 36) are incorrect. A grade can not be both > 90 and < 89 at the same time! And if someone gets 100% then your program will give him no grade at all. Line 36 should read simply >= 90. The conditional statements … | |
Re: >>WIN32_IE Version of Internet Explorer -- has little, or nothing, to do with the version of MS-Windows except that it must support IE3 or newer. If that section of code is getting skipped by your compiler's preprocessor then define _WIN32_IE to be at least 0x300 to 0x700 (version 3 to … | |
Re: in the command prompt window type the name of the program you want to run and press <Enter> key. You may have to change directories to where the program is located if it is not in the PATH list. | |
Re: >>why do these two programs have different outputs Don't know either. What are the two outputs? | |
Re: [QUOTE=Ptarila;413392]how do i build a graphical user interface in visual c++[/QUOTE] Its pretty complicated and requires a thorough understandanding of C or C++ language -- definitely not for beginners. But [URL="http://www.winprog.org/tutorial/"]here[/URL] is a popular tutorial that gives you the basics. How to build the program depends on which oversion of … | |
Re: Are you attempting to write a C or C++ program? This is the C++ board. If you really mean a C program then I or one of the other mods will move it the the C board. Excactly how to read the CSV file depends on what character is used … | |
Re: [QUOTE=lasher511;412945]. All the males do is eat sleep and have sex really.[/QUOTE] Like most human men :) | |
Do you realize they don't work in signatures? I just saw it too, the most recent post anupam_smart, [URL="http://www.daniweb.com/forums/thread83846.html"]here[/URL] | |
Re: Or one of [URL="http://www.daniweb.com/code/coder46588.html"]these[/URL] |
The End.