49,755 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.