49,761 Topics
| |
Hi all, I have defined a function cat which takes in 2 cstring arguments and returns out a pointer to a new cstring which cocatenates the 2 strings I am having 2 problems with it. the cout statement doesnt work and secondly i get a runtime error while i delete. … | |
An amateur meteorologist wants to keep track of weather conditions during the past year's three month summer season and has designated each day as either rainy(R), cloudy (C) or sunny (S). Write a program that stores this information in a 3x30 array of characters, where the row indicates the month … | |
The program is suppose to write and then read data from the binary file and use seekg to display specific data depending on what is entered by the user. It displays the correct information when 1 is entered but not 0. Any help would be greatly appreciated. [CODE]#include <iostream> #include … | |
Hey, So I am having this problem with this code. I think the problem is that shortpath[0].distance is being set to 0, and so never going into the if statement of updatepaths() therefore messing up the whole program. But I don't know why it is being set to 0. Here … | |
I wonder for the folder: C:\\WINDOWS\\system32 What I try to do in C++ is to create and read a file from this folder by using this call to that specific folder. [code] System::Environment::GetFolderPath(Environment::SpecialFolder::System) [/code] What my question is, is if this folder can be locked at some computers. Is it … | |
I am supposed to be working on this problem that stores info in a 2x20 array of characters where the row indicates the month and the column indicates teh day. We have to read in from a file and then create a report that displays for each month and for … | |
Hey, I'm relatively new to C++, started a few days ago and I'm new to this forum community as well. I made a simple program where the computer asks you for your name, then age, followed by your hometown and your occupation (in that order). It works fine, but there's … | |
Can anyone recommend a good resource for revising for my c++ exam? Thanks | |
[code=cplusplus] #include <iostream> #include <iomanip> using namespace std; int main() { char again; do { // Define the varibles char letter = 0; // Tell them to enter a lower case. cout << "Enter an lowercase letter: "; cin >>("%c", &letter); // Check whether the input is lowercase and // … | |
hi guys, need help urgently on extracting data from text file and compute it. i'm suppose to sum up the highest temp and divide them by 7 to get an average decimal. only display data on compiler without calculating the average sum. ok here is my code. #include <iostream> #include … | |
Hi all, Ok, so I obviously have an issue with how I'm thinking about accessor methods. In the following code, why are the printed out values equal? MyClass.h: [code] #ifndef MYCLASS_H_ #define MYCLASS_H_ using namespace std; class MyClass { friend ostream &operator<< (ostream &stream,MyClass const &rhs); public: MyClass(); MyClass(int); MyClass(MyClass&); … | |
So for my last assignment i have to create a program that allows the user to input 100 foods, enter calorie amount and then using bubble sort and binary search it has to be able to display them back to the user. I have all of this done except the … | |
Somebody help me build this program, its sort of challenging...Instructions say to store player's name, number and points scored by each player...Program should keep an array of 12 of these structures, each element is for a different player ona team...program should ask user to enter the data above for each … | |
if i have this matrix 37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 74324986199524741059474233309513058123726617309629 91942213363574161572522430563301811072406154908250 23067588207539346171171980310421047513778063246676 89261670696623633820136378418383684178734361726757 28112879812849979408065481931592621691275889832738 44274228917432520321923589422876796487670272189318 47451445736001306439091167216856844588711603153276 70386486105843025439939619828917593665686757934951 62176457141856560629502157223196586755079324193331 64906352462741904929101432445813822663347944758178 92575867718337217661963751590579239728245598838407 58203565325359399008402633568948830189458628227828 80181199384826282014278194139940567587151170094390 35398664372827112653829987240784473053190104293586 86515506006295864861532075273371959191420517255829 71693888707715466499115593487603532921714970056938 54370070576826684624621495650076471787294438377604 53282654108756828443191190634694037855217779295145 36123272525000296071075082563815656710885258350721 45876576172410976447339110607218265236877223636045 17423706905851860660448207621209813287860733969412 81142660418086830619328460811191061556940512689692 51934325451728388641918047049293215058642563049483 62467221648435076201727918039944693004732956340691 15732444386908125794514089057706229429197107928209 55037687525678773091862540744969844508330393682126 18336384825330154686196124348767681297534375946515 80386287592878490201521685554828717201219257766954 78182833757993103614740356856449095527097864797581 16726320100436897842553539920931837441497806860984 48403098129077791799088218795327364475675590848030 87086987551392711854517078544161852424320693150332 59959406895756536782107074926966537676326235447210 69793950679652694742597709739166693763042633987085 41052684708299085211399427365734116182760315001271 65378607361501080857009149939512557028198746004375 35829035317434717326932123578154982629742552737307 94953759765105305946966067683156574377167401875275 88902802571733229619176668713819931811048770190271 25267680276078003013678680992525463401061632866526 36270218540497705585629946580636237993140746255962 24074486908231174977792365466257246923322810917141 91430288197103288597806669760892938638285025333403 … | |
i wrote this program and i want display 0, if the character entered is not an alphabet (!@#$% 5 or any other non alphabet) can i have a quick solution #include <stdio.h> void main () { char char1,char2; printf("\tEnter first character :"); scanf("\t%c", &char1); printf("\tEnter second character :"); scanf("\n\t%c", &char2); … | |
Ok so I want to create some code which can generate a random number from a 1. Music file 2. A microphone PLEASE is their anyway i can do this | |
Hi, I am looking for api to get CPU utilization in linux. I want use that api in c++ program. anyone plz help me.. | |
I have completed an OOP course using C++ and each student has been asked to do an end term project, so that they make use of all things that was learned, like ( operator oveloading, inheritance , polymorphisms, files, templates) and every thing that can support the project. I want … | |
Hi guys, first post so be nice :S I've been working on a software project (wordsearch generator) for one of my classes at university and I'm stumped on this section. I'm supplied with an array filled with x strings, the integer value of x (for the size of the array) … | |
hello all , im having a problem throwing corba system exception the following is my code [code] #include <createPlan.h> #include <writeLog.h> bool createPlanFunc(const schedule_Mgmt::planData & newPlanData1) ACE_THROW_SPEC (( CORBA::SystemException , schedule_Mgmt::alreadyExists , schedule_Mgmt::unknownErr )) { try { ofstream outfile("/cc/smc3/ss_pool4/elem_level_mgmt/tools/Schedule_Mgmt/Schedule_Mgmt/src/scheduleLog.txt",ios::app); bool repeatdelay_bool; bool notonweekend_bool; bool validity_bool; const char* prepeatdelay; const char* … | |
NOTE:This is a correction from my previous post. Hey, So I am having this problem with this code. I think the problem is that shortpath[0].distance is being set to 0, and so never going into the if statement of updatepaths() therefore messing up the whole program. But I don't know … | |
I have a very hard programming challenge and i need help... I have nothing so far, so im hoping somebody could help me build it... Im to write a program that uses a structure to store student name, student ID number, pointer to and array of test scores, average test … | |
I have started a code to declare what I need...now I need to input the information from a file each line is a song with a space inbetween... Then after I get the data I have to be able to seach by artist or title...and output matches PLEASE help... this … | |
Hey, am trying to create an application that displays a text box and a submit button, so that the user can type text into the text box, click submit and it saves it into a txt file. Could you help me please? Thanks in advanced | |
Hi, At one of our clients’ place, we are facing a problem where the variable errno is set to EPIPE and signal SIGPIPE is generated… We have two servers communicating with each other through sockets and the error we are getting is explained below The writer process seems to have … | |
Hello all. Haven't asked a question here in a while. Anyway, i am working on a game. I made the graphics class and now am working on a camera. I thought of making it so the camera would have a reference of the main world variable. So i tried doing … | |
Hi I am making a roman numeral to decimal converter, I have the decimal to roman numeral converter but I am having trouble doing it from roman to decimal. How do you pull a string apart letter by letter; eg VXI, into 3 variables a= V, b= X, c= I. … | |
Write a function that takes as an argument a two-dimensional array with 9 lines and 9 columns (with integer elements), and verifies if the matrix contains a valid Sudoku solution. | |
I almost have my overloaded += operator working. I just need some help polishing it. My problem is that if I put one list as +4x^4 and the other list as +3x^3+2x^2 then the list stays stuck on the first term of the first list. Can anyone throw me a … | |
Hi, I have to use fscanf to read the numbers in a line. The line is in the file "FileName1" and may or may not have EOF. I am using the following code and it is stuck in an infinite loop. [ICODE] FILE *Fileget; vector<int> get_value; Fileget = fopen(FileName1, "r"); … |
The End.