15,300 Posted Topics
Re: Instead of closing and reopening the file you can just move the file pointer back to the beginning of the file. Call [URL="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365541(v=VS.85).aspx"]SetFilePointer[/URL]() | |
Re: All errors have to be corrected before you can attempt to execute it. The compiler will not generate the *.exe (or *.lib or *.dll) file until you fix all the error messages. | |
Re: your program worked correctly for me using vc++ 2010 express. Below is the output I got on the console window. But you need to clear the input keyboard buffer after getchar() to remove the Enter key '\n'. [code] Please specify the number of the task. * You can choose on … | |
Re: don't expect it to run on modern versions of MS-Windows operating system unless you also install [URL="http://www.google.com/#sclient=psy-ab&hl=en&source=hp&q=dosbox+download&pbx=1&oq=dosbox&aq=1&aqi=g4&aql=1&gs_sm=c&gs_upl=0l0l1l82l0l0l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=4d90baad82b9465&biw=1053&bih=474"]DosBox[/URL] | |
Re: My son swears by newegg.com. When I need hardware I just ask my son to get it for me and newegg almost always has the least expensive prices. I don't know about ordering large quantities of IT equipment. | |
Re: I doubt anyone is going to spoon-feed you with line-by-line explanation. If you know enough of c++ then you will recognize most of that code. | |
Re: You have almost all the code you need to solve the problem. Just add a counter, initialize it to 0, then every time getline() is called increment the counter. That's all there is to it. | |
Re: [URL="http://en.wikipedia.org/wiki/Function_(computer_science)"]This is the link you want[/URL] | |
Re: >>Daniweb know how many users are not able to use forums other than to post replies to existing posts? What! are you in second grade or something? You mean you can't see that big yellow button that says "START NEW THREAD" ? If not then you need glasses much worse … | |
Re: Lived long: you are over age 45 Prospered: You are happy and satisfied with your life. You have good health and a family who loves you. | |
Re: use a for loop to iterate through the string and count the number of Ts. You need to count both upper and lower cast Ts. | |
Re: It will depend on the contents of the structure and how it was allocated. Post the structure and appropriate code to get better comments. | |
| |
Re: What operating system are you trying to run that compiler under? It won't run on Windows 7 without running it inside [URL="http://www.dosbox.com/"]DosBox[/URL] | |
Re: You have to copy the characters you want into the new arrays. In your example you will have to declare four character arrays (not pointers!) that are 3 characters each, the 3d one is for the null terminating character. Then just iterate through the original string using either an index … | |
Re: did you try [URL="http://www.dpstele.com/layers/l2/snmp_l2_tut_part1.php"]this tutorial[/URL]? Please post a few of the link errors. | |
Re: In order to use MS Access or any other SQL database you need to learn the SQL language -- or at least have a basic understanding of it. There are several [URL="http://dmoz.org/Computers/Programming/Languages/C++/Class_Libraries/Database/"]free c++ ODBC classes[/URL] and [URL="http://www.codeproject.com/database/simple_odbc.asp"]here[/URL] that will simplify connecting to the database, quering and receiving the resultsets. You … | |
Re: You can not hide the class declaration from the application program, but you can put the code that implement the class methods into a library so that the implementation code is hidden from the application program. There are two kinds of libraries: static and dynamic. Static libraries have *.lib extension … | |
Re: Welcome to DaniWeb -- and don't be shy about joining in on any of the discussions. New blood (members) is always welcome. | |
Re: [QUOTE=sergent;1662051]. And a lot of those ideas were stolen-- Bill Gates bought DOS really cheaply and Steve Jobs stole the mouse from Xerox (I think).. [/QUOTE] Bill Gates got DOS from IBM so cheaply because IBM didn't know what to do with it and didn't really want it. So yea, … | |
Re: [QUOTE=MooGeek;1638958] TASM is also a programming language and can do anything.[/QUOTE] TASM is an assembler, not a language. It's no more of a language than VC++ 2010, Turbo C. or gcc | |
Re: We have cameras at work too but I normally ignore them, just do my job. The cameras are there for customer theft, and they do work/record all the time. | |
Re: which line did the error occur on ? And make sure spelling and capitalization are all consistent. | |
Re: >>In fact, most of the time you want to flush a stream, it gets flushed for you automatically anyway, and it's redundant to use something that explicitly flushes the stream for you. That may be true of console screens but probably not of file-based streams. That behavior is os dependent … | |
Re: Make sure the denominator in that equation is not 0. Print out the value of the variables so that you can verify them. Also, get rid of those gets() calls such as on line 36 because they can let you enter more characters than the array can hold; the extra … | |
I just started a new store (see my signature for link). It was set up on IPage with a few simple steps. The problem is that I don't know how to calculate shipping costs. How is that done for UPS? Also how about sales taxes? AFAIK USA does not have … | |
Re: I don't know if it will work, but try calling [URL="http://msdn.microsoft.com/en-us/library/x99tb11d(v=vs.71).aspx"]setlocale[/URL]() for the desired language. | |
Re: [QUOTE=chiiqui]What do you do before you start coding/ review/ learn your language or code? what are some websites enhance your brain, or get your brain ready to review.[/QUOTE] Well I certainly hope you have learned the language before you start to code a program :) | |
Re: USA has had its share of such problems since 1960 (LA bombings), and how about those car burnings in France about a year or so ago. Nigeria is more noted for its spam and scams then as a terrorist nation. | |
Re: DaniWeb logo on back "I'm an addict" on the front | |
Re: You're right -- clicking the Search button just brings up some crazy useless window. | |
Re: Post code because its a bit hard for us to see the program you wrote on your monitor. | |
Re: C, C++, php, java, C#, and SQL are probably the most important ones. A great deal will depend on the kind of programming you want to do. | |
Re: >> why they needed to make 2 types of strings, char string and w_char string? Because there are languages other than English. The alphabet in some of those languages, such as Chinese, can not be represented by one-byte char variable. There are two versions of all, or most, win32 api … | |
Re: You can get a list of all the files/folders in a folder by first calling FindFirstFile() then call FindNextFile() until it returns no more files. Both functions returns a structure that contains the timestamp that your program will need to check. The problem is that your program may not be … | |
Re: Depends on the operating system. MS-Windows I'd say its vc++ 2010. *nix it would be either g++ or Code::Blocks. For portability between the two operating systems (and I think MAC too) it would have to be Code::Blocks. | |
Re: I just discovered this, and will gladly donate the cpu time of my computer to this worthwhile team effort. | |
Re: >>Give names of some languages that use negative array index A couple centuries ago I worked with a version of HP BASIC that would let you use negative index values without doing any of the tricks as previously posted in this thread. When the array is declared you specified both … | |
Re: why even bother to translate it into assembly? Other than, of course, for the learning experience. Other than academic, there is no good reason to translate it. | |
Re: [URL="http://www.cplusplus.com/reference/clibrary/cstdio/remove/"]link here[/URL] | |
Re: Not possible in the way you described it. But what you can do is to give functions a text string name that is associated with a function pointer. [code] struct fns { std::string name; int (*fn)(); // function pointer }; [/code] Now you will make an array of the above … | |
Re: VC++ 2010 and earlier versions will create assembly listings of your c and c++ programs. You have the option of having it include the op codes too. | |
Re: The entire win32 api is written in C language, not c++, hence there are few if any C++ tutorials. If you want strictly c++ then I'd suggest looking into [URL="http://www.google.com/#sclient=psy-ab&hl=en&source=hp&q=wxwidgets+tutorial&pbx=1&oq=wxWidgets&aq=1&aqi=g4&aql=1&gs_sm=c&gs_upl=0l0l1l97l0l0l0l0l0l0l0l0ll0l0&bav=on.2,or.r_gc.r_pw.&fp=504df108955b74df&biw=1068&bih=495"]wxWidets[/URL] | |
Re: First, its not good to open the same file twice. Use just one FILE* pointer and use it for both reading and writing. Call fseek() to move the FILE pointer back to the beginning if you need to but its not necessary to open the file again. The only way … | |
Dani, will you someday change the editor in the Report Bad Post link to use the same advanced editor that is used in other places, so that we can see the "insert link" and smily faces buttons? I could probably insert the tags manually but never seem to remember how … | |
Re: The problem could be the difference in environment variables or current working directory. In the system() line try adding the full path to that batch file and see if that works. | |
Re: This compiles without error -- did not attempt to run it. I actually got a hint how to do it from the compiler's error message [icode] : error C2440: '=' : cannot convert from 'FARPROC' to 'void (__cdecl *)(char *)' [/icode] [code] int main(void) { char szMsg[]="Hello, World!"; HINSTANCE hIns; … | |
Re: >>I'm currently using Microsoft Visual C++ 2010 Express edition to create my application in, should I be using something else? Depends on the application. C++/CLI, C#, or VB.NET may be better languages especially if there are lots of windows and other visual objects. >>I'm currently using Microsoft Visual C++ 2010 … | |
Re: In Numbers.cpp you failed to provide the class name in front of the function names on lines 12, 16, 21 and 25. See line 6 for the correct way to code those functions. |
The End.