15,300 Posted Topics

Member Avatar for Aruna S Rajan
Member Avatar for dblbac

>>what does he mean by this why don't you ask him? But my guess is that you need to add three functions, two functions each return an int and the other function is void [code] int function1() { return 0; } int function2() { return 0; } void function3() { …

Member Avatar for Jishnu
0
149
Member Avatar for tonyaim83

you have to iterate through the directory and delete them one at a time. See FindFirstFile() and FileNextFile() to iterate through the directory.

Member Avatar for tonyaim83
0
194
Member Avatar for eranga262154

That control is only used in MFC programs. And [URL="http://msdn2.microsoft.com/en-us/library/3f24b741(VS.80).aspx"]here are its methods [/URL]that an MFC program can call.

Member Avatar for eranga262154
0
1K
Member Avatar for MattEvans

what version of vc++ are you using. The code below compiles ok without warnings with vc++ 2005 express [code] class foo { public: foo() {this->x = 0;} private: int x; }; int main() { foo f; return 0; } [/code] >>I want to pass 'this' of a class one of …

Member Avatar for MattEvans
0
554
Member Avatar for dblbac

>>and i cammot figure out why. Because you told it to print it on line 82. Delete that line and it will be ok.

Member Avatar for dblbac
0
118
Member Avatar for Mohammad21

There is a free one at [url]www.DataReel.com[/url], has been ported to both *nix and MS-Windows, and has scripts to compile with most popular compilers under both operating systems. Also contains a lot of examples. There are probably a lot of other free libraries too but that is the only one …

Member Avatar for Ancient Dragon
0
119
Member Avatar for jrice528

In that last loop you have to just count the number of items that are zero. Then after the end of the loop if the counter is still zero you can display the "no Inventory" message.

Member Avatar for Ancient Dragon
0
291
Member Avatar for Dean_X

>>for ( int month = 1; month <= N_MONTHS; month++ Array elements start at 0, not 1 and that loop should too [icode]for ( int month = 0; month < N_MONTHS; month++ )[/icode] >> cout << N_MONTHS+9 << endl; What is that supposed to be? Why display the number 21 …

Member Avatar for Ancient Dragon
0
115
Member Avatar for iseedeadpeople
Member Avatar for Ancient Dragon
0
102
Member Avatar for nicz888

Here is the standard way to convert a string to upper case [code] while (*c) { *c = toppper(*c); ++c; } [/code] After tokenizing the string you need to put them in an array so that you can search the array for a string.

Member Avatar for Ancient Dragon
0
127
Member Avatar for jaux

methods of a class are never ever on the stack -- only data objects go there. [code] int main() { Foo f; // object f goes on the stack, but not the methods of that object. } [/code]

Member Avatar for jaux
0
120
Member Avatar for zizimetalique

>>void main() Not valid code. use [b]int main()[/b] instead. all you have to do is write two functions. Please show us the code YOU have written to complete that assignment. We will NOT do your homework for you, but will gladly help you write it yourself.

Member Avatar for Ancient Dragon
0
94
Member Avatar for johny112

and don't be afraid to make liberal use of { and } in the loops so that you can add additional lines with the loops. Even though not required with one-line statements they braces are good to use so that you can easily change the code. [code] for(int i=0; i<10; …

Member Avatar for WaltP
0
95
Member Avatar for rayy

>>i'm around for more clarificaions Ok, then lets see the code YOU have written.

Member Avatar for Nick Evan
0
86
Member Avatar for Nidaa87
Re: help

Which part of that assignment do you need help on? What don't you understand ? Have you even tried yet ?

Member Avatar for Nidaa87
0
93
Member Avatar for bpage

First you need to initialize the array to some known value -- normally 0 -- to prevent it containing random values. Here is the easiest and most common way to do that [icode]char key[25] = {0};[/icode] Is your program going to be case-insensitive? That is, 'A' is treated the same …

Member Avatar for bpage
0
158
Member Avatar for driplet

C and C++ languages really don't have a character data type -- [b]char[/b] is readlly just a one-byte integer. Characters such as 'a', 'b', etc can be represented in [b]char[/b], [b]int[/b], or [b]long[/b] because internally they are just integers and have an integer value. What you see as on the …

Member Avatar for Ancient Dragon
0
90
Member Avatar for mugenoid
Member Avatar for FireNet
0
749
Member Avatar for tonyaim83

With 28 posts you should know by now that you have to post code if you expect anyone to be able to answer your question.

Member Avatar for WaltP
0
168
Member Avatar for mayank_ati

Cricket? Is it anything like golf? To my knowledge no one plays cricket here in USA.

Member Avatar for sneekula
0
150
Member Avatar for The Dude
Member Avatar for guy40az

I have not seen any problems using VC++ 2005 Express or VC++ 6.0 in Vista Home. They produce a few warning messages when started but ignoring them does not seem to do any harm. Could be because I don't write programs that take advantage of any new Vista features. I …

Member Avatar for Ancient Dragon
0
101
Member Avatar for Max_Payne

>>'bool Point::includes(const Point &) const' : overloaded member function not found in 'Point' Check spelling -- should be [b]PointCollection::includes[/b]. Others probably have a similar error

Member Avatar for Max_Payne
0
119
Member Avatar for Biro

The .dat file extension usually refers to files that contain binary information as opposed to text files. So if you want to read a binary file you have to open it with ios::binary flag as the second argument to the open() function. If you don't do that and if you …

Member Avatar for Salem
0
908
Member Avatar for Ancient Dragon

All I see are those little squares where the menubar should be. This just started in the last 6 hours or so. (IE7 on Vista Home) [edit]Oops! its back to normal now. I have no idea what went wrong.[/edit]

Member Avatar for Ancient Dragon
1
100
Member Avatar for samtben111

>>What is the mutable keyword? never heard of it. >>what are the differences between a pointer and reference Read your textbook or other threads

Member Avatar for Ancient Dragon
0
68
Member Avatar for atiti.m001
Member Avatar for tonyaim83

[QUOTE=ithelp;488844]Use system('mkdir');[/QUOTE] No need for the system call -- just call [URL="http://unixhelp.ed.ac.uk/CGI/man-cgi?mkdir"]mkdir[/URL] function.

Member Avatar for Ancient Dragon
0
98
Member Avatar for Ancient Dragon

I'm really supprised no [URL="http://www.youtube.com/watch?v=Mal6XbN5cEg"]one has posted this[/URL]! I didn't find it but got the link from mattireland at [URL="http://www.programmingforums.org/thread14717.html"]PFO[/URL]

Member Avatar for scru
0
72
Member Avatar for planktonfist

It is a lot easier to sort the data if you should create a structure to hold the information for one city then create an array of those structures. >>strcmp not liking the strings. Yes, strcmp() wants char*, not strings. If you using string objects then you can pass method …

Member Avatar for planktonfist
0
126
Member Avatar for Z101

>>file_numerals = fopen (("%s", fileName),"r"); The first parameter to fopen is NOT a format string like printf() but the filename. How did you even get this program to compile without any errors anyway????? Here is how it should be:[icode] file_numerials = fopen(filename, "r"); [/icode] [quote] while (!feof(file_numerals)); { fscanf (file_numerals, …

Member Avatar for Z101
0
181
Member Avatar for mrmrmrmr

how about just simple assignment [code] int x1 = buf[14]; // 15th byte int x2 = buf[15]; // 16th byte [/code]

Member Avatar for Salem
0
171
Member Avatar for tamlo
Re: C++

Post what you have done so far. You will need an array of those structures, one for each month. Then just loop through the array and sum up the values.

Member Avatar for Lerner
0
163
Member Avatar for safira

you mean in the old ancient Turbo C ? You can't. Get a newer compiler that supports such things.

Member Avatar for WaltP
0
76
Member Avatar for Ancient Dragon
Member Avatar for jbennet
0
242
Member Avatar for DylanWright

>>I am a moth major what is a [b]moth[/b] major? An Entomology major perhaps? >>and don't understand C++ programming language What you posted isn't c++. Its C, which is a different language. What are the prerequisits for the class you are now taking? Is one of them at least one …

Member Avatar for Salem
0
108
Member Avatar for hectic

You need a smarter compiler. Here's the warning I get with VC++ 2005 Express [quote] \dvlp\test12\test12\test12.cpp(89) : warning C4717: 'rad' : recursive on all control paths, function will cause runtime stack overflow[/quote] The reason is that the last line of the rad() function make a recursive call without bounds. That …

Member Avatar for Ancient Dragon
0
257
Member Avatar for ashok1424

fscanf() may not work for this purpose-- (1) it will allow you to enter more characters than the buffer can hold which will cause your program to crash and (2) it stops reading the keyboard at the first space so the name you enter can not contain spaces. The solution …

Member Avatar for Nick Evan
0
103
Member Avatar for sahoo.satya1984
Member Avatar for Ancient Dragon
0
50
Member Avatar for wijitha

That's the only way to do it when using basic C-style arrays. If you are writing a c++ program then use std::string instead of char* and you will be able to easily get the array size whenever you need it.

Member Avatar for Nick Evan
0
254
Member Avatar for vrnadh123

Let me guess: you are using an ancient compiler such as Turbo C in MS-Windows operating system. If that is correct then you can forget about doing that because the os will not allow it, as you have already found out.

Member Avatar for Ancient Dragon
0
136
Member Avatar for chaosatom333

[QUOTE=Jishnu;486866]What is that? [a.out] [/QUOTE] The default name of the executable when using *nix compilers is [b]a.out[/b]. Don't know why but probably just the custom by now.

Member Avatar for Nick Evan
0
116
Member Avatar for Marauder_Pilot

>>The reverse when you store in string3 is to add '0' Marauder: Note that you can only store a single digit using this -- '0' through '9'. Doesn't work for numeric values 10 and above or negative numbers. >>char string1[10] ={'0','0','0','9','3','1','4','0','9','1'}; Well that's one way to do it -- and …

Member Avatar for Ancient Dragon
0
119
Member Avatar for Dean_X

The function you posted is incorrect. Below is the correction, but the if statement may be wrong. You have to declare [b]newBal[/b] at the top of the function so that it has scope in the entire function. [code] double newBal(double minimumPayment, double balanceline, double lateFee, double APR) { double newBal …

Member Avatar for WaltP
0
178
Member Avatar for jaepi

There is no standard C or C++ library function to do that, you have to get it from os api. I'm not *nix programmer so I can't help you there. Sorry.

Member Avatar for Ancient Dragon
0
46
Member Avatar for sonturk

How much of this have you already written ? None? then why not? Do it in small steps and it will be a lot easier for you to code. Start here [code] int main() { return 0; } [/code] Compile that and if it compiles add another little bit, such …

Member Avatar for Ancient Dragon
0
99
Member Avatar for balla4eva33

>>then how do I need to adjust this implementation file to work with it!? You have to add two more methods: (1) print(), and (2) the * operator. The code you posted already has the = and + operators so make the * operator look similar to that + operator. …

Member Avatar for balla4eva33
0
161
Member Avatar for people123

line 30: modf() takes pointers to two doubles. [b]value[/b] is not a double. And it returns a double, not an integer. Please read the [URL="http://www.cplusplus.com/reference/clibrary/cmath/modf.html"]documentation [/URL]for functions you use.

Member Avatar for people123
0
110
Member Avatar for sartann

Did you search your school text book for those two functions? We are not here to write all the code for you but to help you write it yourself. If we write it you will learn nothing. Search around and you will find millions of examples of those two functions.

Member Avatar for Ancient Dragon
0
75

The End.