49,761 Topics

Member Avatar for
Member Avatar for dsuh06

if " int*& ptr " is declared as a parameter of a function, what does it do? for example: findMax(int arr[], int n, int*& ptr)

Member Avatar for dsuh06
0
70
Member Avatar for alleli

hei please... i need a simple game just using loops and arrays... kindly jelp me...huhuhu:( :'( thanks in advance

Member Avatar for WaltP
0
90
Member Avatar for sonsofliberty84

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 …

Member Avatar for Ancient Dragon
0
298
Member Avatar for mastro

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: …

Member Avatar for mastro
0
409
Member Avatar for gchasproblem

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 …

Member Avatar for Ancient Dragon
0
110
Member Avatar for toko

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 [] …

Member Avatar for toko
0
91
Member Avatar for balla4eva33

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 …

Member Avatar for balla4eva33
0
116
Member Avatar for tones1986

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 …

Member Avatar for tones1986
0
120
Member Avatar for legendarya49

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 …

Member Avatar for legendarya49
0
142
Member Avatar for poopsy

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

Member Avatar for Lerner
0
97
Member Avatar for shipar

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.

Member Avatar for shipar
0
110
Member Avatar for kv79

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 …

Member Avatar for kv79
0
123
Member Avatar for rishid

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(); …

Member Avatar for vmanes
0
73
Member Avatar for jadedreality

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 …

Member Avatar for vmanes
0
129
Member Avatar for deraj8

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 …

Member Avatar for Ancient Dragon
0
119
Member Avatar for toko

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 >> …

Member Avatar for toko
0
157
Member Avatar for knowledgelover

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]

Member Avatar for Killer_Typo
0
423
Member Avatar for jadedreality

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 = …

Member Avatar for Ancient Dragon
0
234
Member Avatar for Oreynid

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. …

Member Avatar for Salem
0
10K
Member Avatar for onelilfizzle

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 …

Member Avatar for Lycaon
0
72
Member Avatar for bigt2008

[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; } …

Member Avatar for Lerner
0
86
Member Avatar for ENG ISE student

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. …

Member Avatar for ENG ISE student
0
94
Member Avatar for BlackNinja

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

Member Avatar for vijayan121
0
70
Member Avatar for vincex200

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 …

Member Avatar for Ancient Dragon
0
97
Member Avatar for johnnyjohn20

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 …

Member Avatar for Salem
0
139
Member Avatar for ENG ISE student

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 …

Member Avatar for ENG ISE student
0
111
Member Avatar for quickster12

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 …

Member Avatar for vmanes
0
88
Member Avatar for helixkod

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 …

Member Avatar for helixkod
0
119
Member Avatar for djJonno

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 …

0
63
Member Avatar for darklich13

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 …

Member Avatar for darklich13
0
102

The End.