15,300 Posted Topics

Member Avatar for WonderWomen204

This is nothing more than a stupid rehash of [URL="http://www.daniweb.com/forums/thread118131.html"]another thread[/URL] that was already answered. No point in doing it again. Just read the previous thread to get the answer.

Member Avatar for Ancient Dragon
0
122
Member Avatar for infernojmd

It would be nice if you explained what this program is supposed to do. Given the input file what is the output file supposed to look like ?

Member Avatar for Ancient Dragon
0
123
Member Avatar for soosai
Member Avatar for cquestion

you declared [b]outputLegend[/b] as [b]const[/b] array but trying to pass it to a function that expects non-const. Change the function to require const [code]void printTxtArray(const char *B[]);[/code]

Member Avatar for Ancient Dragon
0
92
Member Avatar for M&M

>>what do i do next Start by testing the word to see if it begins with a vowel. You will probably want to write a series of if -- else if --- else if --- statements to test each of the requirements.

Member Avatar for Ancient Dragon
0
96
Member Avatar for peter_budo

The post count on all my threads are the same. You probably need to refresh your browser page.

Member Avatar for jbennet
0
100
Member Avatar for CE Student

Nobody is going to do your homework for you without pay. Put $1,000.00 USD in my paypal account and I'll write it for you. Otherise, post what you have done and we'll go from there.

Member Avatar for ivailosp
0
219
Member Avatar for Swift7625
Member Avatar for poojaa

>>Can anyone help with it Not really. Your are probably using the wrong compiler and/or operating system. Just comment out that line and see what errors you get. You might have to define some stuff yourself.

Member Avatar for Ancient Dragon
0
38
Member Avatar for Adrian99420

I know that compiler does not support MFC but you might browse [url]www.codeproject.com[/url] because they probably have an mfc combo box class that does something like that and will give you ideas how to do it with win32 api functions.

Member Avatar for mitrmkar
0
176
Member Avatar for nurulshidanoni
Re: Why

line 15: delete it because its not needed. Your logic in that while statement beginning on lines 26 to 50 is all screwed up. Here's the correction which is a lot less code than what you have. [code] int tempTotal; stream1 >> tempExamID >> tempTotal; aExam.examid = tempExamID; aExam.total.push_back(tempTotal); while …

Member Avatar for nurulshidanoni
0
112
Member Avatar for nurulshidanoni

You can use std::sort() algorithm and write your own comparison function for it. [URL="http://msdn2.microsoft.com/en-us/library/ecdecxh1(VS.80).aspx"]Here is an example[/URL] And you can find more information in [URL="http://www.google.com/search?hl=en&q=std%3A%3Asort"]these google links[/URL]

Member Avatar for mitrmkar
0
611
Member Avatar for quecoder

Q1: knowledge of c++ is only the beginning to writing a program like the one you posted. It also requires several years of very intense study of hardware and software Q2: Depends on how knowledgeable you are in the field of compiler design. Many people with Ph.D have written their …

Member Avatar for quecoder
0
124
Member Avatar for nelledawg
Member Avatar for jephthah
0
115
Member Avatar for Arne Kristoffer

>> 'vector' : undeclared identifier Don't you think that should tell you something about your program? Did you look to see where [b]vector[/b] is declared? Just in case you really have no clue you have to include <vector> header file.

Member Avatar for Arne Kristoffer
0
167
Member Avatar for aminit

lines 9, 10, and 11: I thought this was supposed to be c++, not C ?????? So why are you writing C-style code in a c++ program? [code] cout << "Enter the keyword"; cin >> keyw; cout << "Enter the key"; cin >> key; [/code]

Member Avatar for Sky Diploma
0
299
Member Avatar for Nemoticchigga

copy it to a temp array then copy however you want [code] unsigned char tmp[sizeof(int)]; int x = 123; memcpy(tmp,&x, sizeof(int)); // now you can copy tmp array the way you want to [/code]

Member Avatar for Ancient Dragon
0
104
Member Avatar for theausum

You would save yourself a lot of trouble by learning to use [URL="http://www.csupomona.edu/~dlbell/cppexplanationsfa99/23.html"]google[/URL]. which found that link in just a few seconds.

Member Avatar for Narue
0
89
Member Avatar for rje7
Member Avatar for GeddiGuy

How do you <snipped link> with pencil & paper ? If you know that then doing it in C or C++ is trivel.

Member Avatar for Ancient Dragon
0
57
Member Avatar for nurulshidanoni
Member Avatar for Ancient Dragon
0
119
Member Avatar for BroKeN

>>i am new around here Not with 22 posts under your belt If you were banned you wouldn't be able to make this post. As for the color of your name -- looks normal to me.

Member Avatar for jbennet
0
94
Member Avatar for wollacott

line 3: wrong function parameters. There are only two valid ways to code that function: [icode]int main(int argc, char* argv[])[/icode] [icode]int main()[/icode] You will have to change all the lines that reference [b]sc[/b] to use [b]argv[1][/b] instead. Or you could just add another variable and leave the rest of the …

Member Avatar for jephthah
0
288
Member Avatar for tootypegs

[URL="http://www.newobjects.com/pages/ndl/SQLite2%5CSQL-OleDate.htm"]Here is some infor[/URL] If using MS-Windows c++ program and you already have a DATE (double) object, then you can call [URL="http://msdn2.microsoft.com/en-us/library/ms221440.aspx"]VariantTimeToSystemTime[/URL] to populate a SYSTEMTIME time structure which you can then use however you wish.

Member Avatar for tootypegs
0
305
Member Avatar for rt7878
Member Avatar for sneekula
0
159
Member Avatar for Black Magic

when you enter a non-digit cin will set the error flag so all you have to do is test for it [code] if( cin.error() ) { cout << "ERROR ..."; cin.clear(); // clear the error flag } [/code]

Member Avatar for Ancient Dragon
0
112
Member Avatar for infernojmd

convert to string then insert the commas [code] #include <sstream> #include <string> using namespace sd; int main() { int n = 4200; stringstream stream; stream << n; string str; stream >> str; // now insert the commas in the appropirate spot // I'll leave that up to you to figure …

Member Avatar for Lerner
0
108
Member Avatar for noraantonia

That saves it as binary data, so you can not view it with Notepad. If you want it saved as text then convert with CString [code] CString s; s.Format("%d", r); ar << s; [/code]

Member Avatar for Ancient Dragon
0
136
Member Avatar for rockmania

You have to use TurboC or TurboC++ compilers to use either of those links. graphics.h is obsolete and not supported by all other compilers. I don't really know the answer to the question but I think it will be pretty complicated. [URL="http://filext.com/file-extension/JPG"]Here [/URL]is the jpg file format and [URL="http://www.google.com/search?hl=en&q=jpg+file+format"]here [/URL]are …

Member Avatar for Salem
0
151
Member Avatar for vileoxidation

#1: get rid of that [b]goto[/b] statement (lines 12 and 52)-- its a sure way to get an F on that program. To exit the do loop when -1 is entered, add this on line 17: [icode]if( size < 0) break;[/icode] line 47: isn't 0 a valid input value? If …

Member Avatar for vileoxidation
0
133
Member Avatar for Suraine

1. The header file should not have any code -- just function prototype [icode]extern short int DetectSensor(int sensorvalue[10]);[/icode] Notice the semicolon at the end and there are no ( and ) 2. In the *.cpp file, enclose the name of your header file in quotes [icode]#include "MySensor.H"; [/icode] Angle bracks …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for kemo0o

That may sound simple, but it isn't. Drawing objects such as lines, elipses etc can be very complicated depending on the operating system and compiler.

Member Avatar for Ancient Dragon
0
102
Member Avatar for electromania

ok, here is example code [code] void print(int x, int y) { cout << x << " " << y << "\n"; } void calculate( int* meanx, int* meany) // The two parameters are pointers to the integers that // are declared in main() { *meanx = 1; *meany = …

Member Avatar for Ancient Dragon
0
283
Member Avatar for lolodede
Member Avatar for Ancient Dragon
0
107
Member Avatar for hjong.mahjong

1. Learn to format the code better so that you and others can more easily read/understand it. Don't be afraid to make liberal use of spaces and tabs. Aligh each { with matching } and don't put the all at the same place. 2. Recognize repeating code and try to …

Member Avatar for hjong.mahjong
0
105
Member Avatar for 11moshiko11

[code] [color=red]Grade ** [/color]AddGrade(Grade ** _numGrades,int& _students) { _students++; Grade ** gradeTemp=new Grade * [_students]; for(int i=0;i<_students-1;i++) gradeTemp[i]=_numGrades[i]; [color=red] delete[] _numGrades; return gradeTemp; [/color] } [/code] or use a reference [code] void AddGrade(Grade **[color=red]&[/color] _numGrades,int& _students) { _students++; Grade ** gradeTemp=new Grade * [_students]; for(int i=0;i<_students-1;i++) gradeTemp[i]=_numGrades[i]; [color=red] delete[] _numGrades; …

Member Avatar for dougy83
0
83
Member Avatar for wollacott

The parameter to getc() is a FILE pointer, not a char. Please read the [URL="http://www.hmug.org/man/3/getc.php"]man docs[/URL] before attempting to use standard C functions.

Member Avatar for Aia
0
313
Member Avatar for GL.Za

[QUOTE=B|enderZa;574921]you'll prob never want to see my incode comments, LOL .[/QUOTE] If they look like your first post 3 years ago then your teacher may mark down your grades. Write for others as well as yourself.

Member Avatar for Serunson
0
195
Member Avatar for theausum

We're not going to get into yet another flame war on this topic. One is not better or worse than the other. Which one to use depends on the application.

Member Avatar for Ancient Dragon
0
61
Member Avatar for marti3a3

I always just use [icode]cin.get()[/icode] because it doesn't need a variable. This function should not beclared as [b]inline[/b] because the compiler will likely ignore that request. [b]inline[/b] code is normally reserved for one or two line functions, and compilers do not have to honor it at all. [code] float* Eccentricity(float …

Member Avatar for Ancient Dragon
0
87
Member Avatar for hjjayakrishnan

of course its not necessary to use classes or structures. fstream can and frequently does work with POD (plain old data) types.

Member Avatar for Ancient Dragon
0
50
Member Avatar for cutseyPrincess
Member Avatar for Trckst3

Look at line 18: That is an infinite loop. Delete it and your program won't loop back.

Member Avatar for Ancient Dragon
0
100
Member Avatar for daviddoria

>>Can you do this at all Sortof. What you do is write a public Initialize() method for class A so that it can be called by the class constructor as well as by anyone else. [code] class A { private: int x; public: A() { Initialize(); } A(int w) {x …

Member Avatar for dougy83
0
161
Member Avatar for TheBeast32

Try [URL="http://www.daniweb.com/forums/thread94878.html"]this one[/URL].

Member Avatar for TheBeast32
0
177
Member Avatar for Skeezo

line 10: That function doesn't take any parameters. It should be identical to line 48 but with a semicolon at the end.

Member Avatar for Skeezo
0
314
Member Avatar for infernojmd

use getline() to read each line of the file then a loop to iterate through the string [code] std::string line; while( getline( infile, line ) ) { // make changes not shown // outfile << line << "\n"; } [/code]

Member Avatar for Ancient Dragon
0
95
Member Avatar for lolodede
Re: c++

I've seen this identical problem just a day or so ago. Nice you posted your homework problem, now what is it that you expect from us? I don't have my crystle ball at the moment so I can't read your mind.

Member Avatar for ivailosp
0
251
Member Avatar for roachic

You are writing an MFC program so surly by now you have learned to read the MSDN docs for each of the MFC functions you use. You do know about that don't you ? [URL="http://msdn2.microsoft.com/en-us/library/9c36ed1d(VS.80).aspx"]Read this[/URL] and you will find the function you are looking for.

Member Avatar for roachic
0
157
Member Avatar for techniner
Member Avatar for Ancient Dragon
0
87

The End.