15,300 Posted Topics

Member Avatar for jadedman

If you are uisng VC++ 2005 or 2008 then you can't use iostream.h at all. That file is obsolete and has been replace with <iostream> And yes, you can have stdio.h and <iostream> both in the same program.

Member Avatar for Jawahar prabhu
0
1K
Member Avatar for JackDurden

this is a c++ program, so use c++ classes [code] #include <string> #include <iostream> #include <vector> using namespace std; int main() { vector<string> arry; ifstream in("filename.txt"); string word; while( in >> word ) { array.push_back(word); } } [/code] But, in your example [icode]while (myfile>>a[names]) [/icode] should be [icode]while (myfile>>a) [/icode]

Member Avatar for Alex Edwards
0
186
Member Avatar for erabyss

What you are doing is a very aukward and poor design. I think you are approaching this all wrong. why not just use dynamic arrays, such as std::vector, which can contain as many i78tems as you want without resorting to rewriting the function and recompiling the program every time.

Member Avatar for Ancient Dragon
0
86
Member Avatar for Dave Sinkula

Yup, there's lots of pork on all sides of the fense. Like the Mid America Airport not far from where I live -- its an expansion of Scott AFB (Air Force Base). It was great for Scott AFB, but that's about all. It was originally supposed to suppliment Lanbert International …

Member Avatar for Lardmeister
0
142
Member Avatar for Extreme

[QUOTE=Narue;692395]Congratulations, muraliaa! It took you only [b]four years[/b] to come up with the same answer as me.[/QUOTE] Some people are just a little slow :)

Member Avatar for Ancient Dragon
0
185
Member Avatar for Jennifer84

The trick is to use [b]fixed[/b] [icode]c1 << fixed << setw(6) << Total; [/icode]

Member Avatar for Jennifer84
0
95
Member Avatar for unbeatable0

>>I checked about SetSuspendState() in DaniWeb, and googled it, but came up with nothing. Not supprised about DaniWeb, but [URL="http://www.google.com/search?hl=en&q=SetSuspendState&btnG=Google+Search&aq=f&oq="]google had lots of links[/URL] Always either search MSDN or google for all win32 api functions, and they will give you detailed information. [URL="http://msdn.microsoft.com/en-us/library/aa373201.aspx"]Here is the information you need.[/URL]

Member Avatar for dougy83
0
566
Member Avatar for zoner7

I compiled/linked your program without any warnings or errors. Maybe you need to move the source code to a folder whose name does not contain any spaces, such as c:\dev-cpp\source

Member Avatar for dougy83
0
86
Member Avatar for rhb512000

It takes a loooooooooooooong time for it to defrag a hard drive -- expect it to work for a couple hours depending on the size of the hard drive and how full it is. If the hard drive is nearly full then defrag won't be able to do much with …

Member Avatar for Ancient Dragon
0
95
Member Avatar for Ancient Dragon

[URL="http://www.worldcommunitygrid.org/index.jsp"]World Community Grid[/URL] is similar to Folding@Home. I have created a new DaniWeb team account that everyone is welcome to join. You can have both Folding@Home and World Community Grid running on the same computer. I started this new account because I was disassitified with the software available at Folding@Home. …

Member Avatar for GrimJack
0
199
Member Avatar for paolomontero

You need to study a windows tutorial to understand that. There is no single function. [URL="http://www.winprog.org/tutorial/"]This tutorial[/URL] will tell you how to add menus to your windows programs.

Member Avatar for marco93
0
139
Member Avatar for saneeha
Member Avatar for Ancient Dragon
0
74
Member Avatar for chanda gul

There are differences. You can not copy the registry from XP to Vista or vice versa.

Member Avatar for Ancient Dragon
0
48
Member Avatar for nizbit

line 323: According to line 17 length_iter() requires an array of characters. passijng *_string only passes a sincle character, not the entire array. And rstring is not an array of characters, but a reference to a single character. I think what you want is this: [code] void SString::operator+([color=red]const char* [/color]rstring) …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for plike922

I don't know how you did it, but I do know the code you posted can't compile cleanly. For example the loop that starts on line 35 is all wrong. It could be written like this (or use whatever string comparison function you wish). [code] for(i=48; i<size; i--) { if( …

Member Avatar for Aia
0
145
Member Avatar for timelapse

>>(I have no idea what that means) time() is a function that's declared in time.h (or in c++ <ctime>). It returns an unsigned integer that contains the number of seconds that has elapsed since some predetermined date -- it used to be Jan 1970, but I'm not sure if that …

Member Avatar for VernonDozier
0
1K
Member Avatar for coolcampers

^M is a carrage return -- '\r-- which is used to deliniate end-of-line on some operating systems. If you are transferring the file from *nix or MAC to MS-Windows then you need to replace it with "\r\n".

Member Avatar for Narue
0
2K
Member Avatar for abu taher
Member Avatar for Ancient Dragon
0
100
Member Avatar for marcosjp

It will help to know what the error messages are. I'm supprised those compiled with a MSWindows compiler. You can't leave both dimensions of the arrays unspecified [code] void printOctets(int octets[10][], char []); void printInterval(int suntwk[10][], int brdc[10][]); [/code]

Member Avatar for marcosjp
0
102
Member Avatar for nizbit

line 5: [b]class[/b] is misspelled. line 8: you must specify a length if you want to use a character array. If you want to use dynaming array allocation then use a pointer -- [icode]char* _string;[/icode] line 49: you must end the class declaration with }; The constructor with two parameters …

Member Avatar for ivailosp
0
181
Member Avatar for john88

1) I would create a structure that holds the count and string for each word [code] struct words { std::string word; int count; } [/code] Now have a vector of these structures [icode]vector<words> wordList;[/icode] Now when you get a word, search the vector for occurence. It its already in the …

Member Avatar for john88
0
94
Member Avatar for BattlingMaxo

Microsoft Visual C++ 2008 Express is free and the newest of the M$ compilers.

Member Avatar for BattlingMaxo
0
121
Member Avatar for nameless987

try [URL="http://www.google.com/search?hl=en&q=integers+with+infinite+precision&aq=f&oq="]these google links[/URL]

Member Avatar for iamthwee
0
1K
Member Avatar for BeyondTheEye

Lines 27 and 28 can only appear in ONE *.cpp file -- doesn't matter which one. Remove those lines from the header file.

Member Avatar for BeyondTheEye
0
261
Member Avatar for robbie_j0

After getting the two file names if they are the same open the two files with normal streams then read them one character at a time.

Member Avatar for robbie_j0
0
104
Member Avatar for sretep2122

function getData() 1) You did not open the file. I suggest you use ifstream instead of fstream because I think its easier to use. [icode] ifstream file("MenuData.txt");[/icode] You didn't post the contents of the data file so I don't know how it should be read. But I'm sure its not …

Member Avatar for VernonDozier
0
207
Member Avatar for nizbit

you have a dvd class that contains string objects. Why are you writing your own string class when there is a perfectly good std::string class?

Member Avatar for Ancient Dragon
0
95
Member Avatar for goodmuyis

One reason that happens is because you compiled your program for debug instead of release. More than likely the computer you installed your program on does not have the Microsoft debug DLLs. Compile for release mode and retest.

Member Avatar for Duoas
0
90
Member Avatar for jacobdet
Member Avatar for jholland1964

That has been discusses at length in other threads. Seek and yea shall find.

Member Avatar for Ancient Dragon
0
85
Member Avatar for guerilladong
Member Avatar for califguy

temp.a is NOT a pointer, so line 18 can't work. [code] int x=0; for(x=0;x<=9;x++) { n->a[x] = *b1++; } [/code]

Member Avatar for califguy
0
87
Member Avatar for inim38

[QUOTE=stilllearning;689581] Also [URL="http://www.mattjustice.com/cnotes/c_fileio.html"]here[/URL] is a C File I/O tutorial to help you get started.[/QUOTE] link is broken

Member Avatar for inim38
0
120
Member Avatar for ah_bear

check the Recycle Bin and see if the os moved the files there. If they are there then you can just simply restore them.

Member Avatar for Bob_180_Bob
0
165
Member Avatar for clutchkiller

Better to buy a good book -- it will last longer and you can easily read/reread as often as you want. Books are also very handy to keep at your side while programming. You can look things up in a book while you can't do that with a video without …

Member Avatar for Ancient Dragon
0
155
Member Avatar for DeboJackson

Are you able to compile/link the example/test files that come with the MySQL++ distribution? I have the distribution for MS-Windows, using a different compiler, and have no problems with the sample/test programs.

Member Avatar for Normand Bedard
0
219
Member Avatar for winbatch

try the same thing in a single threded program and you will probably get the same or similar results.

Member Avatar for Ancient Dragon
0
143
Member Avatar for ahspats

Since CountVowels() returns an integer, then the OUT parameter must be a pointer [icode]int CountVowels (char text[], counter_t* Count);[/icode] I don't know what integer that function is supposed to return -- certainly not a counter_t object because that isn't an integer. If you make the second parameter a pointer as …

Member Avatar for ahspats
0
143
Member Avatar for devnar

Your first code prints c++ for me using VC++ 2008 Express. What compiler are you using?

Member Avatar for smart_pc
0
586
Member Avatar for Suetan

Use your compiler's debugger, put a breakpoint on that function, and find out why it prints the wrong day of the week. My guess is that dayNum is wrong -- Sun should be 0, but dayNum may use 1 for Sunday.

Member Avatar for Suetan
0
239
Member Avatar for mmgs_101

My suggestion: toss it into the trash can and get another computer. Or if you're the techi type you might try replacing the motherboard.

Member Avatar for Dragonf1re
0
98
Member Avatar for arupa
Member Avatar for LizR
0
316
Member Avatar for alexvena

Read in your textbook or online about the parameter to ins.get() -- it takes a pointer and you are passing a char. Whenever you get an error like this one you need to look up the function in your textbook or google for it so that you can verify for …

Member Avatar for mshahid
0
84
Member Avatar for rugs267

don't use strtok() on std::string objects because strtok() will put 0s in the string which will invalidate the std::string object. The c++ way to achieve this is [code] int main() { string str = "123 Mike November,12 1990"; size_t pos = str.find_first_of(" ,"); while(pos != string::npos) { cout << str.substr(0, …

Member Avatar for rugs267
0
253
Member Avatar for BeyondTheEye

>>Somehow seems as if the "stdio.h" doesn't recognize the type File That's correct because there is no such thing in stdio.h -- its FILE (all caps).

Member Avatar for Narue
0
267
Member Avatar for pads

Urgent for you maybe, but not for me. Just what do you want us to do with those requirements ? BTW: you failed to post the equation that calculates BMI

Member Avatar for MelechM
0
149
Member Avatar for mancode1007

Please quote the exact problem because what you posted doesn't make a lot of sense. One possibility is this: [code] void foo( int a, int b, int c, int*sum, int* average) { } [/code]

Member Avatar for Majestics
0
102
Member Avatar for Ancient Dragon

Has anyone been able to compile the lib files using Microsoft Visual C++ 2008 Express compiler? I downloaded and installed MySQL 5.0 Server yesterday, then downloaded MySQL++ source. Attempted to compile and got a bunch of link errors. I used dumpbin.exe to get a list of all the symbols in …

Member Avatar for mitrmkar
0
167
Member Avatar for mohit_t

[URL="http://www.codeproject.com/KB/aspnet/AJAXUpload.aspx"]Read this article[/URL]. I don't know if it will help you or not.

Member Avatar for Ancient Dragon
0
86
Member Avatar for Himanshu1984

[URL="http://www.google.com/search?hl=en&q=how+to+play+media+files+in+windows+ce&aq=f&oq="]have you used google to search for the solution to your problem[/URL]? [URL="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.windowsce.embedded&tid=356c5a4f-0d38-4dc3-af9e-5844121667d2&cat=en-us-msdn&lang=en&cr=US&sloc=en-us&m=1&p=1"]Here is an interesting thread [/URL]in Microsoft support site.

Member Avatar for Himanshu1984
0
282

The End.