49,755 Topics

Member Avatar for
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
115
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
113
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
96
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
109
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
72
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
125
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
150
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
399
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
71
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
96
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
110
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
Member Avatar for Slate2006

I need to change the AvgGrade2 function to work with what is shown, but i do not know what to edit for it to work correctly. [code] #include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; struct ClassList { // Definition of a structure called ClassList // ClassList …

Member Avatar for Lerner
0
88
Member Avatar for coolbreeze

My program works, but I would like for the numbers to be random instead of 1-12... I know I have to do srand and I want the numbers to at least go to 50, so like a rand()%50, but I'm not really sure where to plug it in, if thats …

Member Avatar for danzona
0
98
Member Avatar for Villanmac

I know you cant do my work for me but could someone give me some guidance as to how I should approach this to get me going. Im going to need the For loop but Im not sure how? Question- Write a function that displays at the left margin of …

Member Avatar for Lerner
0
121
Member Avatar for mikeandike22

Hi im trying to take a .dat file with just a list of integers separated by lines. The program has to allow for whether or not the list is an even amount of numbers or not. im a bit stuck here is what i have so far. [CODE]#include <iostream> #include …

Member Avatar for mikeandike22
0
668
Member Avatar for zizimetalique

can you help me writing a code for this please i am confused St. Habakkuk of the Abacus is the patron saint of software engineers. He was a public scribe and money-changer (an honest one) in the late Roman Empire, when all computation was performed on a kind of abacus …

Member Avatar for ithelp
0
106
Member Avatar for dssn

I have to write a program that calculates a students final grade. The program should allow the user to input a students name, their exam grades, and their lab grades. using fstream The program should determine averages, calculate the final grade and display the output. For each student generate the …

Member Avatar for ithelp
0
68

The End.