49,761 Topics

Member Avatar for
Member Avatar for mikeandike22

The program calculates the standard deviation by having the user input the list of numbers into an array. So i get these errors on the program error C2057: expected constant expression error C2466: cannot allocate an array of constant size 0 error C2133: 'Nums' : unknown size here is the …

Member Avatar for Nick Evan
0
277
Member Avatar for blackslash13

Which is the most suitable source code? I need a programmer with a large experience on C++ to answer this question. [code] #include <string> #include <iostream> #include <limits> int main() { using namespace std; const int THISYEAR = 2007; string yourName; int birthYear,bad_input; cout << "What's your name ? " …

Member Avatar for Salem
0
99
Member Avatar for c.kiranmayee
Member Avatar for Amnah AL-Abdi

hello..... iam new memeber,and may be my quistion is easy to ask it,but really i need to help me in my problem. we know that the size of any array must be determined befor the running time,since it static location, my quistion is: if i need to make aprogramme in …

Member Avatar for ithelp
0
80
Member Avatar for mauriciomf

I tried strcpy() to copy AnsiStrings, but is only for (char *) type. Anybody knows how to do this, i'm using Borland C++ 6.0.

Member Avatar for mauriciomf
0
87
Member Avatar for kidjl

Hello everybody. I am beginner in programming.....However, recently i recieved a simple assigment from my Professor. The assigment asks me to use C++ and create a programe that will display a series of Fabonacci numbers after the user enter a number . For example if the user enter 10 , …

Member Avatar for jbennet
0
142
Member Avatar for powellinthesout

I don't know which one to use, cC or C++. I want the user with the client to be able to register, login, interact in the game with others, and log out. Can anyone point me in the right direction? Thank You!

Member Avatar for powellinthesout
0
117
Member Avatar for bilalb1

Hi Hope u r all well... here is my problem... i want to remove duplicate entries from a text file while maintaining the order of the text say if the text file contains 123zabc 456def 123abc 456def. 123def 456def 123abc i want the result to be like 123zabc 456def 123abc …

Member Avatar for bilalb1
0
722
Member Avatar for java.cream

[CODE]1 write out “Enter the amount: ” 2 readinAmount 3 WithVat ← Amount * 1.175 4 write out “With VAT added that becomes ”, WithVat[/CODE] If a design (or program) is purely sequential, with no loops, [COLOR="Red"]it might be thought to be very limited; the above VAT design is not …

Member Avatar for java.cream
0
100
Member Avatar for heav_yduty

Hi! I made a FTP client. And I want to add a handler to remove directory from FTP server I got one, which removes files, but I don't know how to remove directory I got this to remove files void CInetFTPDlg::OnBremove() { UpdateData(true); if (m_sFile != "") { m_fcConnection->Remove(m_sFile); UpdateData(false); …

0
53
Member Avatar for enuff4life

the function, IsPalindrome is recursive. it checks character array from 0 to end of it. i have warning message control reaches end of non-void function... whats wrong with this code? [CODE=C]int main() { length = strlen(string); boolean = IsPalindrome(string, 0, length); ... } int IsPalindrome (char* string, int left, int …

Member Avatar for WaltP
0
143
Member Avatar for gretschduojet1

Hello everyone, I haven't been stuck in quite some time, but I'm stuck. I have to read a list of names from a file, then sort them, then write the sorted names to a second file. I've been going to forum and reading articles on line but I don't understand …

Member Avatar for WaltP
0
78
Member Avatar for snowflake

Here is the implement for the Merge Sort function in my ADT. I am able to get Bubble Sort and Quick Sort working, but I get a Heap Corruption Error. template<class Type> void listType<Type>::mergeSort() { recursiveMergeSort(0, (maxSize - 1)); }//end of "mergeSort" template<class Type> void listType<Type>::recursiveMergeSort(int first, int last) { …

Member Avatar for snowflake
0
161
Member Avatar for enuff4life

in doing C, in my function OpenData, it takes a point to array in main, take command-line argument name, and arraysize pointer. i get warning passing arg of 'function' makes integer from pointer OR pointer from intgeger without a cast... what does it mean? and i get con [CODE=C]int main(int …

Member Avatar for Ancient Dragon
0
117
Member Avatar for questiontime

I dont have much experience with C++ but enough with the syntax to get my way around, i am currently on the book "Beginning game programming" by Michael Morrison...So i am pretty new to projects and linking source code together and whatnot... The book doesnt really explain how to make …

0
60
Member Avatar for dev.cplusplus

Hi to all, I have the following request/question: I’ll tell my history: I’m working in a company like a C++ programmer (for almost a year), lately I feel like I’m not going forward professional talking. I’ll explain myself: I receive assignments like fix BUGS or write small functions in the …

Member Avatar for Ancient Dragon
0
97
Member Avatar for rogenie

here is my code. I don't know why it always returns the value that i do not ask for.?? This code display the name I typed in if it is inside the array. [CODE]//this will sort strings using selection sort #include <iostream> using namespace std; const int NUM_NAMES = 20, …

Member Avatar for WaltP
0
125
Member Avatar for ricnyx

im the newbie among the newbie .....need a nice and patient guy who willing to guide me of my assignment.....cause the deadline is tis weekend......i dun know or can say hard to post the problem out...cause too many.............need urgent reply.........can msn ??? pls pls pls pls...........i got plenty of question …

Member Avatar for bilalb1
0
107
Member Avatar for juoyaf

can any one help interipre this to a code. I'm not able to figure out this code below: Read a type If that type's not 0 Read the number of pounds Repeat the steps until the type == 0 [code] for (int n=0;n<buyer.type;n++) { fin >>buyer.type; if (buyer.type !=0) {fin>>buyer.pound; …

Member Avatar for vmanes
0
84
Member Avatar for picklesandmayo

Hello, I am a new CS student and I am taking a C++ course. I am running into problems with a simple number generation program. Basically, I have to generate 2 single digit numbers and then request the user to multiply them. (I know there is nothing in there yet …

Member Avatar for picklesandmayo
0
122
Member Avatar for malathuis

Need to Modify my codes to include a function for both A and B. The function for A should have the quantity of numbers passed in as a parameter and needs to return the largest number. The function for B should have no parameters and return the smallest number. What …

Member Avatar for malathuis
0
121
Member Avatar for johnpmii

Hello, I'm tring to read a text file and pull pieces of the line into separate functions. I can open and close the file in the main. When I use the getline() it reads the whole line, I only want to read up to a certain point using strings instead …

Member Avatar for Duoas
0
157
Member Avatar for phalaris_trip

I know this is a slightly esoteric question, but I'm just curious how you guys define your function macros. Do you put a semicolon at the end or not? For example: [code=cplusplus] #define EVENT_RESIZE(_event) ::SDL::HandleEventResize(_event, hScreen, fnSDLKey); // or #define EVENT_RESIZE(_event) ::SDL::HandleEventResize(_event, hScreen, fnSDLKey) [/code] In the first case, the …

Member Avatar for phalaris_trip
0
93
Member Avatar for Dha_King

Hello, i have a easy problem for u guys =). I have searched the webb but can't find a solution for it. How do i solve this kind of problems, Sorry for the spelling as usual ;)? [code] Text::Text(const char ch) { strcpy(m_str,ch); }[/code] m_str is a char *. ch …

Member Avatar for Dha_King
0
1K
Member Avatar for enes

i want to to able to access to a class's vairable but this varible is not declared class's header file it is in the cpp file i couldn't write a method that acces to it because methods cannot access it(since the variable is not in the header file) how can …

Member Avatar for WaltP
0
102
Member Avatar for scru

Just some questions. Can Visual C++ express be used to code non-CLI applications? What is the proper way to do this? What's up with the stdafx.h header? Can somebody explain what that is for please? How come I can't use stdio.h for C code in it? (yet printf and other …

Member Avatar for scru
0
124
Member Avatar for fudawala

Hi, I need some help writing this program. The question states to write a program that specifies three one-dimensional arrays named current, resistance, and volts. Each array should be capable of holding 10 elements. Using a for loop, input values for the current and resistance arrays. The entries in the …

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

how would i write a maximum number test function that will take any number of arguments and returns the greatest of them??? i know i need to used recursion function, but how should i declare the function?? here is what i have so far [code=c++] double maxNumber( double inputNum,A double …

Member Avatar for Duoas
0
139
Member Avatar for eren

The purpose of this assignment is to give practice programming in writing functions, developing algorithms and using loop structures. Positive integers can have the following personalities: prime or composite, happy or unhappy, square or not square, smug or not smug, and honest or dishonest. You will write a C++ program …

Member Avatar for Ancient Dragon
0
132
Member Avatar for tootypegs

Hi basically i have a program that gets a handle on a USB device lusing '\\\\?\\e:' but i want to be able to get a handle on it using its device instance id 'STORAGE\REMOVABLEMEDIA\7&324ACC50&0&RM:' How do i impliment this, i have tried the following below and it just doesnt work …

Member Avatar for tootypegs
0
102

The End.