49,761 Topics
| |
Write a c++ program that will read in, from a file entitled "word.txt", an unknown number of single words (no spaces ). The program will then print out the word, move 2 tabs to the right, display the word with the first letter removed, move 2 tabs to the right, … | |
I must do an assignment, so it's so hard for me to do. Now, the deadline is coming sooner and sooner, i can't finish and don't know how to do it. I need someone here can help me, i give the best regard first. Here is the assignment; please send … | |
trying to make a program to say the change due back after a purchase is made. this is what i have so far but it doesn't want to work so i really could use some help please. [code=cplusplus] #include <iostream> #include <string> // do not remove /******************************************************************** * User Include … | |
i hace a class in c++ bcw [code] class Student { public: private: unsigned int sIdNum; char sSurname[20]; char sFirstname[20]; char mathid[10]; };//Student [/code] i need a function that fills a Student type dynamic array from a bin file called binfile1.dta the array starts with size[30]. And then do the … | |
[code]#include <iostream.h> int main(void){ int a; int b; int c; cin >> a; cin >> b; c = a+b; cout << c; return 0; } [/code] I am trying to create an "addition machine". As of now, after I run the program, I can input a number and then another … | |
Good day. I recently purchased a TI-84 calculator and realized that it has some programming commands as a c++ compiler would. Is it possible to load a c++ program on a ti-84 calculator...thx | |
i ned elp in using do while loop.. the program must be in like the username and the password.. when the pasword is incorect that you have already assigned it is backing into the beginning.. when the password is correct it ends.. the username is kulot the pasword is 1234 … | |
I have to ge t the result using call by reference. I'm receiving 4 errors??? from my understanding, I have 'declared' total before main. Quite frankly, I'm not getting why not declared it on display_output nonetheless?? and why total is still not being recognized?? Thanks in advance for the help! … | |
can anybody pls tell me the full examples of address operator overloading,assignment operator overloading stream insertion operator overloading and stream extraction operator overloading? | |
I'm just a second year college student in Computer Science so please be nice..:) I have this course requirement where we were asked to make a program about any hashing technique. I chose Division because it's easier. Anyways, I'm having a hard time in getting the "highest prime number". When … | |
Hi all, In my MFC application I've create two buttons, OPEN and CLOSE, used to open a text file and close it. I do it as follows. [CODE=cplusplus] void CSRFToolDlg::OnBnClickedOpen() { char* ReadFileName = "G:\\Work On\\CPP\\SRFTool\\text_file.txt" ; if(openFile.Open(ReadFileName, CFile::modeCreate | CFile::modeReadWrite)) { AfxMessageBox("File creates successfully", MB_OK) ; } else { … | |
I'm attempting to write a function that scans a number from the user as a string and converts the string to an array of int type, then reverses the order of the array and puts zeroes where no scanned data exists (eg. program says "Enter a number up to 5 … | |
I have to take in a list of song names. When the user types in "mmm" then it stops, and it spits out the first and last song titles in a sorted list (alphabetically). This is what I came up with, and there's many an error, all seemingly bool errors. … | |
Hi friends, Can you pls tell me about "[B]explicit template instantiation[/B]". Suppose I have a simple program : 1. File : TClass.h [code] #ifndef CTCLASS_H #define CTCLASS_H template<class T> class CTClass { public: CTClass(T t1, T t2); ~CTClass(); T add(); private: T cm_T1; T cm_T2; }; template<class T> CTClass<T>::CTClass(T t1,T … | |
I am mingle with my CS labs to find the solution of how to find the maximum and minimum number of a entered numbers,can anyoe help me note "no function and array required to manipulate data in our lab"; | |
Hi, I am a newbie, can someone please clarify the difference between "\0" and '\0' and 0 as far as C++ is concerned?? Why can't they be used inter-changeably ?? | |
Could someone please give me an idea on how to do this? Suppose you have a group of people that needs to be transported on buses and vans. You can charter a bus only if you can fill it. Each bus holds 50 people. You must provide cans for the … | |
a) A large city has a number of colleges which offer a number of courses. A course may be offered by a number of colleges but the course fee varies between them. In order to help a user to make a decision, a program is needed to provide the following … | |
Okay i am trying to make a lock this is my code: [CODE]#include <iostream> using namespace std; int main () { char key [10]="abcd"; char answer[10]; cout<< "password:"; cin >> answer; if( key == answer) cout << "correct"; else cout << "incorrect"; return main(); }[/CODE] when ever i try to … | |
I wish to a write a program that creates an array of 100 random integers in the range for just argument sake from 1 to 200 and, then use a sequential search to search the array 100 times using randomly generated targets in the same range. Can anybody please help … | |
Help! I need to copy a char array initialized as a string from one array to another, using a function containing one line of code. Here is the code: [code]#include <iostream> using namespace std; void cpystr(char *instr, char *outstr); void cpystr(char *instr, char *outstr) { [COLOR=red]//Insert line of code here[/COLOR] … | |
Write a C++ program that will read user's full name into a C-string. User will enter first name followed by one or more spaces and then the last name. Also, obtain user's student ID also into a C-string. Pass the name and ID obtained along with another C-string to a … | |
I'm new to C++.. and killing my brain to find this 1 error and cannot figure it out!! I don't understand why square cannot equal true??? or false?? this is my 3rd program for my class to turn in!! Any help would be appreciated!! Eddy //This program allow the user … | |
Hi, i've been trying to create a program for implementing high/low pass filters on images. I get the data from a 24 bit .bmp file using the old file handling techniques. The file handling portion of my program works like a breeze, it is the arrays that are giving me … | |
i am new with c++ and as i was going through all the post i found a reserved word i.e. namespace. i am unable to know what do u mean by this and as i was trying to run the program there was a error telling "namespace name required". i … | |
Hi, I write program whitch read data from more industrial PC by SNMP. In program I use functions SnmpMgrOpen(agent, community, timeout, retries); SnmpMgrRequest(*session, requestType, &variableBindings,&errorStatus, &errorIndex) and SnmpMgrClose(*session). Problem is in read data. From first 3 pc data is readed correctly, but from next pc no. Function return no error, … | |
Hi i am writing a program to calculate the area of a shape using functions. I got the program to work fine when there was only one function and one shape however when i added the second one the program will still run both functions. That is even when i … | |
hi, i am reading the book "The c++ standard library -- a tutorial and reference"{N.M.Josuttis} in the beggining of the 6th chapter it says{in regard to container initialization}:: [CODE=c++] std::deque<int> c( (std::istream_iterator<int>(std::cin)), (std::istream_iterator<int>()) );[/CODE]{the weird indentation is on purpose} instead of:: [CODE=c++]std::deque<int> c(std::istream_iterator<int>(std::cin), std::istream_iterator<int>());[/CODE] because [QUOTE="N.M.Josuttis"]In this case, c declares … | |
>>>is there any limit/constraint on the maximum number of nodes that a linked list can have? >>>a linked list does not have to be implmented with a pointer. what else can be implementeation of linked lists? >>>how can a singly linked list be implemented so that insertion requires no test … | |
Just for notes, I'm using VisualStudio 2003. I'm working on a program that's supposed to make the Muller-Lyer illusion. I've got all of the coding done, but now when I try to run it all I get is a load of errors. First, it starts to compile the program and … |
The End.