15,300 Posted Topics

Member Avatar for Powerponken

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]()

Member Avatar for Ancient Dragon
0
182
Member Avatar for jimbakl

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.

Member Avatar for Ancient Dragon
0
113
Member Avatar for vedro-compota

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 …

Member Avatar for vedro-compota
0
1K
Member Avatar for ath1019

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]

Member Avatar for Ancient Dragon
0
90
Member Avatar for Bamahonky

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.

Member Avatar for aneechopper
0
127
Member Avatar for r4rozen

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.

Member Avatar for pseudorandom21
0
245
Member Avatar for Tom_Weston

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.

Member Avatar for L7Sqr
0
104
Member Avatar for meawesome

[URL="http://en.wikipedia.org/wiki/Function_(computer_science)"]This is the link you want[/URL]

Member Avatar for Ancient Dragon
0
71
Member Avatar for Dani

>>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 …

Member Avatar for happygeek
0
1K
Member Avatar for cwarn23

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.

Member Avatar for Netcode
0
158
Member Avatar for Tom_Weston

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.

Member Avatar for mrnutty
0
104
Member Avatar for infantheartlyje

It will depend on the contents of the structure and how it was allocated. Post the structure and appropriate code to get better comments.

Member Avatar for WaltP
0
226
Member Avatar for pseudorandom21

ArtifiocialPerson clone(pseudorandom21) Not funny, and tasteless.

Member Avatar for Netcode
0
98
Member Avatar for nickyevil

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]

Member Avatar for elmonko
0
177
Member Avatar for ilovec++
Member Avatar for busyaish

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 …

Member Avatar for WaltP
0
149
Member Avatar for lAmoebal

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.

Member Avatar for vijayan121
0
4K
Member Avatar for sugantha

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 …

Member Avatar for Ancient Dragon
0
6K
Member Avatar for Labdabeta

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 …

Member Avatar for Labdabeta
0
217
Member Avatar for shhahid

Welcome to DaniWeb -- and don't be shy about joining in on any of the discussions. New blood (members) is always welcome.

Member Avatar for Netcode
0
54
Member Avatar for sergent

[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, …

Member Avatar for AliTheChamp
0
330
Member Avatar for WolfShield

[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

Member Avatar for Netcode
0
1K
Member Avatar for GrimJack

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.

Member Avatar for Netcode
0
601
Member Avatar for cipherbeale

which line did the error occur on ? And make sure spelling and capitalization are all consistent.

Member Avatar for Narue
0
994
Member Avatar for fesago90

>>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 …

Member Avatar for seanwalsh1984
0
574
Member Avatar for aero31aero

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 …

Member Avatar for aero31aero
0
195
Member Avatar for Ancient Dragon

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 …

Member Avatar for mark santa
0
98
Member Avatar for abhitech

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.

Member Avatar for Ancient Dragon
0
34
Member Avatar for chiiqui

[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 :)

Member Avatar for Ancient Dragon
0
172
Member Avatar for Netcode

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.

Member Avatar for Netcode
-2
202
Member Avatar for WASDted
Member Avatar for Ezzaral

You're right -- clicking the Search button just brings up some crazy useless window.

Member Avatar for Dani
0
194
Member Avatar for YaelGD

Post code because its a bit hard for us to see the program you wrote on your monitor.

Member Avatar for sungaw
0
2K
Member Avatar for OblibSystems

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.

Member Avatar for sergent
0
391
Member Avatar for dospy

>> 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 …

Member Avatar for dospy
0
271
Member Avatar for DSTR3

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 …

Member Avatar for DSTR3
0
2K
Member Avatar for D.M.

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.

Member Avatar for pseudorandom21
0
327
Member Avatar for Dani

I just discovered this, and will gladly donate the cpu time of my computer to this worthwhile team effort.

Member Avatar for mitrmkar
4
2K
Member Avatar for anujthefuhrer

>>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 …

Member Avatar for Narue
0
189
Member Avatar for bettybarnes

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.

Member Avatar for AceStryker
0
323
Member Avatar for Zssffssz

[URL="http://www.cplusplus.com/reference/clibrary/cstdio/remove/"]link here[/URL]

Member Avatar for NetJunkie
0
181
Member Avatar for u8sand

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 …

Member Avatar for doug65536
0
303
Member Avatar for Labdabeta

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.

Member Avatar for miker00lz
0
1K
Member Avatar for Panathinaikos22

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]

Member Avatar for Ancient Dragon
0
352
Member Avatar for deepmala8

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 …

Member Avatar for Ancient Dragon
0
917
Member Avatar for Ancient Dragon

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 …

Member Avatar for Ancient Dragon
0
146
Member Avatar for darren2005

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.

Member Avatar for metoohere
0
438
Member Avatar for Frederick2

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; …

Member Avatar for bitluni
0
5K
Member Avatar for Merex

>>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 …

Member Avatar for Merex
0
268
Member Avatar for phorce

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.

Member Avatar for phorce
0
154

The End.