49,761 Topics
| |
if " int*& ptr " is declared as a parameter of a function, what does it do? for example: findMax(int arr[], int n, int*& ptr) | |
hei please... i need a simple game just using loops and arrays... kindly jelp me...huhuhu:( :'( thanks in advance | |
I am trying to modify a program to read in a file that will then output it to a new file without all the whitespace in between the data. This is so I can convert it to a csv file and read it into paraview to make a visualization of … | |
Ticket Reservation System You are asked to implement a ticket reservation system for a travel agency so that staff can book flights for their passengers. You are required to use CPP principles you have learned from the class to implement and to realize the basic system functions. The principles includes: … | |
Hi. I am having a problem with one of my class functions. It compiles fine and works "when it wants to". I am using the search_inventory function in my add_product function of the same class. sometimes it works perfectly fine however sometimes the search_inventory function causes an infinite loop when … | |
i have made a program that gives a defenition of a short form e.g. ;-) = wink [CODE]#include <iostream> using namespace std; int main() { char input[20]; char correct1 [] = "CU"; char correct2 [] = ":-)"; char correct3 [] = ":-("; char correct4 [] = ";-)"; char correct5 [] … | |
I have a new project I'm working on, and I'm stuck. Notice in my code below that I originally had [B]return dayInMonth;[/B], but commented it out as it was returning the year as 27 in the array and the month and dayInMonth both as 1. My year and month should … | |
Hey Folks. I am working on a project in which i have to use Classes and do multiple things with different sorts of data. The basic question i have though is this: what am i doing wrong here in terms of this class declaration etc... i have looked around on … | |
the program gives me an infinite loop [code=c++] #include <iostream> #include <cmath> #include <iomanip> using namespace std; void loadScores( int [], int & ); double average( int [], int ); double deviation(int [], double, int ); void frequency( int [], int[], int, double, double); void sortScores(int [], int ); void … | |
hi all i hav to write a basic tic tac toe game in C++ can somebody help me by givin me a start or explain wat shud b done plzz | |
is it possible [COLOR="Red"]to read a specific data from a defined web page of a defined website[/COLOR]? if possible please help for this.............or suggest me which language is appropriate for that. | |
Hi to everyone, I woud be pleased if you can write me, i have Dev-C++ and when i create project -> Win App in C++ code ,the Dev-C++ write me a lot of code wich i do not really understud how code reflect to a window and if you woud … | |
Hi, Quick question, trying to get the Big O notation of a simple function. Would this be O(n)? Or would the notation be something like O(number of lines in somefile) ? Thanks for the help. [CODE] void createAffiliateNodes() { ifstream file; file.open("somefile"); while ( getline(file, line) ) { } file.close(); … | |
Okay, I wrote a code to translate a character into Morse Code. However, I was reading back over my assignment and I was actually supposed to define a macro PRINT_DOT which prints a period, and a macro PRINT_DASH, which prints an underscore. Then define macros PRINT_A, PRINT_B, etc. Is there … | |
i need to creat a function that will read information from a data file, and store the bank accounts in two seperate parrarell arrays. array “account”, and store the balance on the accounts in array “balance”. here is an example of what i have to do <data file> 231 4000.52 … | |
okay i am trying to compare a char thats a constant with a char that a person has inputed however this is as far as i have gotten and its not working. [CODE] #include <iostream> using namespace std; int main() { char input[20]; char correct [] = "Rudolf"; cin >> … | |
hi, Thanks a lot for posting us this thread it is really valuable [B]But I wonder if I can make the range including negative values besides positive numbers e.g: from -1 to 1 [/B] if you can help be I'll appreciate it thanks again knowledgelover [email]email removed[/email] | |
I am writing a program that prompts a user to enter a line of text, and if there are consecutive blank spaces in the sentence, it will replace those with just one space. Here is the code: [code=c++] int main(int argc, char **argv) { AnsiString; Line; int Index; Line = … | |
Hello all, I've tried reading back threads and the various posted tutorials, etc that here and I've not stumbled upon the answer I'm looking for. I am attempting to write a hangman game as a school project, and I am having trouble getting just one character from the input stream. … | |
how could i write a program that would allow me to send messages to computers near me. they would be on the same network, i think i would have to use an ip address... i am a beging programmer, and i just want to do this for fun. if anybody … | |
[B]so foar I've done this much[/B] using namespace std; int main() { //1.Declares an input stream variable named inFile ifstream inFile; //2.Opens "indata.txt" inFile.open("indata.txt"); //3. If input file was not opened Prints "Input file not found" if (inFile.fail()) { cout << "Could not open file!" << endl; return 1; } … | |
I need to do this do while loop but I dont know how to exactly get it to repeat itself I got an error when I tried to compare pointer to integer and thats what i have in the code below, any thoughts as to how this should be done. … | |
Hi I was just wondering if there was a way to convert a value of double to a string? And if there is what is the command? Thank You in advance | |
My group as a project that is due and we don't know where to start. We attempted it and we failed several times. This is the project. PLEASE HELP US. Write a C++ program that will read data from a file, perform computation on the data, then print the result … | |
I am trying to filter an array with different elements in using an if statement. So far i have if ( a[i] < 0.001 ) a[i] = 0 which works but i have minus values in the array which i wish to keep. Therefore it would be ideal to have … | |
I am a beginning ISE student taking a C++ programming class and am having trouble with the simplest things. I need to write a program that reads in an address in a single line of text then outputs that address in the appropriate form. input: john doe # 1234 main … | |
Ok im one of those people that are just completely unable to pick up C++. Im forced to take this class and i have no prior programmin experience but at least theres only a few weeks left of this. Anyway, I just want help with this assingnment. I'm not lookin … | |
Here is the error: [CODE] cannot convert parameter 1 from 'int *' to 'int *[]'[/CODE] here is my code: [CODE=cpp] #include <iostream> using namespace std; void findMode( int *, int, int); void selectionSort(int *[], int); int main() { int *numbers; //dynamically allocate an array int elements, //holds the number of … | |
Hi, First time posting here. Basically here's my project description. Implement classes for “Sets” e.g. (1,3,6) and “Multisets” e.g.(1,3,6,3,6,6). in C++. Needs to use Dynamic Memory. A single function CalculateAll(mySet1,mySet2) or CalculateAll(myMulSet1,myMulSet2) which displays union, intersection etc... Basically I must use The same function call CalculateAll to work on both … | |
I have a problem where the user enters in their grades from their homework and exams and then the program will tell the user what their grade is. I have everything worked out below but I am missing one key aspect. There are 12 homeworks and only the best 10 … |
The End.