49,755 Topics
| |
Our professor ask us to upload our program in a website, I've been searching through the web with possible ways, but I still can't figure it out how to do it. Do we have to use the .cpp file? There's another problem, I a trying to run the "Application file" … | |
Hi! I need to write a program that moves some letters to the end of a word for example if i enter : cook look book telephone, the result would be: ookc ookl ookb elephonet. i came up with some code but then my ideas run aout...some help would be … | |
Hello all. I'm trying to compile a socket program in DevC++ but everytime I do it I get a lot of linker errors like these: [CODE] [Linker error] undefined reference to `WSAStartup@8' [Linker error] undefined reference to `htons@4' [Linker error] undefined reference to `inet_pton' [Linker error] undefined reference to `socket@12' … | |
Hi guys, i need your help i new to this homepage and im learning c++ i've got homework about this weekend to create something like that: [B][U]Give your Informations (<FirstName> <LastName>, <dd.mm.yyyy>)[/U][/B] now i want to ask you how to check with c++ if a string got a "," would … | |
Hello, im trying to implement a generic double linked list, and i have added just one function(insert). But im getting some errors. Here is the code: [CODE]#include <iostream> #include <cstdio> #include <string> using namespace std; template <typename T> class doubleList { private: struct Node { T info; Node *leftPtr; Node … | |
How do I write a a recursive function that counts the number of sequences that sum up to that number (user input)? | |
I have a problem printing the winners in my Voting Program. Please help me finish it. [CODE]#include <iostream> using namespace std; void DisplayOptions(); //void DisplayOptionsVice(); int InputVote(); int UpdatePoll(); void DisplayPoll(); //void DisplayPollVice(); int VoteArray[5]; //----------------------------- void main() { int option; int loop; int ctr=0; for(loop=0; loop<6; ++loop) { VoteArray[loop]=0; … | |
i am not sure why the value of b is coming out as 0 according to me it should come out as 3 [CODE]#include <iostream> using namespace std; void read(int a[],int n) { for (int k = 0;k < n;k++) { cout << "enter the " << k << "th … | |
For class I have to use a stack to find if a word entered by the user is a palindrome... [CODE]#include <iostream> #include <string> #include <stack> using namespace std; int main() { char *word; int count; stack <char> mystack; stack <char> rev_stack; cout<<"Enter a string "; cin>>word; while(*word!=NULL) { mystack.push(*word); … | |
Arrays are passed by reference (address) by default. Function takes an array and tries to return average, sum of elements, and the sum of the squares. Calculate and display sum, sumsq using for loop in the function definition display sum, avg, and sumsq to see the difference between the values … | |
I have made... well attempted at making a unique random number generator using arrays and functions, but it still will not work and I cannot find my error at all. Can someone please help? T_T [CODE]#include <iostream> #include <ctime> using namespace std; // *****Function prototypes**** void displayArray(int randNum[], int elements); … | |
My problem is to make a program that stores a High temperature and a Low temperature within a two dimensional array and then displays the Average. I can get the numbers to be stored(I think, but the average doesn't work at all it seems to display the last number entered … | |
Hi, I'm having to write Conway's game of life for school and I'm having a little trouble with it. Whenever it runs through the code, all of the 'cells' move to the left a bunch and warp around the screen.. I'm not sure why.. Any help would be great! Thanks! … | |
I need to create a ResistorClass overloaded logical OR operator function which shall do the following: Overload the logical OR operator ( || ) to calculate the equivalent parallel resistance of the nominal values ( m_dptrRes[0]) of two Resistor Class objects. The formula for calculating parallel resistance is: NominalValue1 * … | |
Hi I need help!! My program is supposed to count word occurences from a text file and the output is supposed to look like this a 2 count 1 hello 1 test 2 this 1 words 1 but instead it does this : a 2 a 2 count 1 hello … | |
I have created a histogram program that has the user enter the lower limit of the range, then generates a 20 number array with that number at array[0] and the lower limit + 20 at array[20]. It then does a random number generation where 85% of the randoms are within … | |
Hey; I am having problem with the read and write functions in fstream. They need to have a const char * to read or write from/to buffer. I need to work with integers. Here what happens: [CODE]for(int i = 0; i < numberOfValues; i++) { int random = rand() % … | |
Well, i'm really new to this programming thing, but i don't have a teacher or anything like that, i'm an autodidact so I really have a lot of questions on this matter. I'm trying to do a project using Augmented Reality. As far as I know, there are two main … | |
[CODE]cout << "The sum is " <<sum<<endl<<"The sumCheck is "<<sumCheck<<endl; if (sum==sumCheck) { cout<<"Is a polygon"<<endl; } else { cout<<"Is not a polygon"<<endl; } [/CODE] The sum is correctly displayed as 360 and sumCheck is correctly displayed as 360 yet the message "Is not a polygon" is displayed. I can't … | |
Hey all, I'm creating a text-based RPG and am just now getting to the fighting mechanics. I want to use the rand function to choose a random number within a certain range but am having trouble getting it to execute correctly. [CODE]#include <cstdio> #include <cstdlib> #include <iostream> using namespace std; … | |
I need to compress monochromatic bitmap with modified huffman algorithm here's the algorithm: [url]http://www.iet.unipi.it/m.luise/HTML...n%20Coding.htm[/url] as you see i need to replace pixel (bits) sequence with some bits sequence variable length so im not sure which type to use for bits manipulation iI found this class for bits [url]http://www.codeguru.com/cpp/cpp/cpp_...nipulation.htm[/url] and this … | |
Hi, I have a method call say some fucntion that takes in a pointer of an array of char [CODE]char anArray[32]= {'1', '2', '3', '4', '5', '6'}; // the function call someFunction(&anArray[0]) [/CODE] I don't think I have quite grasped the concepts of pointers yet, does the code i have … | |
I'd be interested to hear your views on which IDE is best for developing in C++ - Eclipse orMS Visual Studio. What are the positives of each and what are the negatives? Many thanks Mairi | |
[COLOR="Red"][U]Need Help Making Keylogger[/U][/COLOR] Hi everyone, My name is hayzam and i want to make an advanced keylogger and what to put it in a USB So when I connect my usb it will open automatically and it must be invisible one more thing i am a newbie to C++ … | |
Hi! I have a program I'm working on for class (CSC 150). I have to read a pgm file into an array, copy it to a second array, manipulate the image and then output to a second file. I'm having a heck of a time figuring out how to do … | |
I have to load two arrays, merge the two arrays into a third array, then create a control break report on name while outputting the most frequent style, then sort the array by style and to a control break on style. Can someone look at my code and see if … | |
Hello, everyone. I'm having a hard time trying to figure out how to declare and initialize my dynamic array of objects. Here is the class definition and constructor definition: [CODE=C++]class SavingsAccount : public BankAccount { public: SavingsAccount(char, int, string, double, int, double=2.00, double=0.0, double=0.0); double getinterestR() const; double getaverageDailyBalance() const; … | |
i am trying to import into a 2d array the following: line one : gpa e.x.[2.3,5.1,....] ^ ^ | | line two : id e.x.[1 ,2 ,....] and after that to sort the gpa in a descending way but in the same time the id to follow each ones gpa. … | |
Hi, Im trying to run this program using dynamic memory i cant seem to get it to keep running it crashes on me. I have the working program so the code is correct im just haveing trouble trying to convert it correctly. Thank You, [CODE]#include <iostream> #include <fstream> using namespace … | |
hey guys, I am a beginner and am having trouble loading data from an external data file and then loading it to the screen. It is supposed to be the temperatures from everyday for a year for 2 years. 1 column is 1930 the other 2000 This is my script, … |
The End.