49,761 Topics

Member Avatar for
Member Avatar for mrgreen108

I'm new to this site, and I heard that I can get help from here with learning programming. I am having trouble with sentence strings. If someone inputs a sentence followed by just a single character, I want the program to only write the sentence until that character is first …

Member Avatar for vmanes
0
116
Member Avatar for jrice528

Ok, i have this program It determines if the number entered is a prime or not. I did that, posted it, and now i need to do this: Determine and print the prime numbers between a user-specified lower bound and user-specified upper bound. Read all through my text and browsed …

Member Avatar for Ancient Dragon
0
142
Member Avatar for 187

Im trying to take all prime numbers 1 to 100 and outputting them to a file but its not working here is my code so far. [code] #include <iostream> #include <fstream> using namespace std; bool isPrime(int numcheck); void write_prime(int prime, ofstream &outfile); int main() { ofstream primefile("prime.txt"); for (int ntc …

Member Avatar for 187
0
95
Member Avatar for ravenous

Hi, Does anyone here have any experience of using libtiff in c++? I have been trying to do some simple image processing using it and I don't seem to be able to write images. I can make files that have roughly the right size, but they're not correct as they …

Member Avatar for ravenous
0
5K
Member Avatar for ice_tea_lemon

Hey all, I was wondering if you could help me out with parts of my C++ code that I'm writing. Overview goes something like this: im making a finance recording system. So i have 5 files. one file is to save all the incomes (like a paycheck). another file is …

Member Avatar for Salem
0
108
Member Avatar for jrice528

I am working on homework, and been doing this assignment with absolutely no luck, i am in need of major help. This is the assignment. Using an array, initialize all elements in the array to 1. Starting with array subscript 2, every time an array element is found whose value …

Member Avatar for jrice528
0
107
Member Avatar for needHelp27

This function should create an array of size 50 containing randomly generated letters within the range [1, 25]. The program should write the randomly generated array to an output file named by the user. Determine the maximum and minimum values and the indices of their first occurrence and also the …

Member Avatar for Narue
0
85
Member Avatar for DREAMER546

hey .. i write this code .. but i have errors .. i think because i didn't use the enum in the right way?! .. can anyone tell my how to correct it .. i got these errors :( .. : 'stone' : redefinition; different basic types see declaration of …

Member Avatar for DREAMER546
0
111
Member Avatar for cuddlerbes

hello everyone.. please help me with my program. Please help me solve a program that could accept more than 10 digits. Thanks

Member Avatar for vmanes
0
84
Member Avatar for Zeking

Hello everyone, I am beginner with Microsoft Visual Studio. I was doing my project and somehow I pressed some shortcut and enabled some kind of "indent notifiers" or whatever the purpose of this thing is. Now I have no clue what I pressed, but it is really irritating, and makes …

Member Avatar for Salem
0
39
Member Avatar for Awais Ahmad

hello guys: i awais ahmad has a simple problem with the two dimensional array. that is how to get two values in one column of the array

Member Avatar for Lerner
0
116
Member Avatar for c++ prog

this program should add 2 integers in the range of 20 digits, but only 10 digits are allowed, else the sum would be incorrect. can anyone plz show me what's wrong with my codes? Here's what i got so far.... [CODE]#include <cstdlib> #include <iostream> using namespace std; int main(int argc, …

Member Avatar for Lerner
0
125
Member Avatar for ArrogantLegend

[B]So here is what I am trying to accomplish. I have been trying and trying for a few hours to figure out how to do this. Write a program that displays a menu with the following choices to the user. A - Find the largest # with a known quantity …

Member Avatar for zippie
0
144
Member Avatar for sarahger9

I am working on a project that inputs stock information from files, then outputs the information when the customer is called upon. I am doing pretty good, but am stuck. This is what I have. [CODE] for (int k = 0; k < namevector.size(); k++){ //namevector is a vector of …

Member Avatar for ithelp
0
69
Member Avatar for webster22

NOW I HAVE SHOWED SOME EFFORT PLEASE HELP ME NOW, HERE IT IS WHAT I WOULD LIKE TO HAVE AND WHAT I HAVE DONE WITH THE CODE. Hi, i have to programm this in c++ can anyone please help me and solve the code i have written Material Weight (kg …

Member Avatar for webster22
0
137
Member Avatar for dsuh06

Hello, I am trying to "peek" the next character to see if it is a character. If the word exceeds the max linelength it should be written in the next line with the count starting from zero again. for example: if the max line length is 10, The max length …

Member Avatar for ithelp
0
145
Member Avatar for Dvb701

// David Barkman // CSIS 123 - Murtha // Program 13 // #include <string> #include <iostream> #include <fstream> using namespace std; void displayMenu(); void addRecord(); void searchRecords(); string userName; int main() { // Prompt fior the user name cout << "Please enter your name to begin: "; // Input the …

Member Avatar for WaltP
0
123
Member Avatar for nitin_rajurkar

Hi, I created File Open Dialog (custom) using GetOpenFileName with hook file. (Files are attached). I am opening a dialog in a main window of application that has a command button. Clicking of this commad button opens File Open dialog. However, after selecting a file and clicking either "Open" or …

0
84
Member Avatar for dsuh06

[CODE=c++] const int MAX=200; char line[MAX]; char s2[MAX]; inf.getline(line,MAX); for(;;) { for(int i=0; i < MAX ; i++) { if (line[i]=='\0') break; else if ( line[i] != ' ') strcat(s2, line[i]); } } [/code] hello, I have a question. I'm trying to have the loop process words in the array …

Member Avatar for Ancient Dragon
0
124
Member Avatar for malathuis

I get the program to run but no matter what choice i make it comes up with -99 to exit... [code=cplusplus] #include <iostream> using namespace std; const int A_QUANTITY = 10; const int B_SENTINEL = -99; int main () { bool again = true; char choice; int biggest = 0; …

Member Avatar for ravenous
0
58
Member Avatar for cl3m0ns

If I were to ask the user to enter the number of employee. Could I put that user entered number into an array? If so how? for example [CODE] int num; cout << "enter number of employees: " ; cin >> num; array[num]; [/CODE] this code doesn't actually work because …

Member Avatar for cl3m0ns
0
95
Member Avatar for dsuh06

I have a project where I need to reformat a plain text file. for example, Hello nice to meet you. Glad to be here. will be reformatted to the following: Hello nice to meet you. Glad to be here. how can i write a code to remove the newline character …

Member Avatar for dsuh06
0
1K
Member Avatar for sarahger9

I'm working on a program that reads in from a file a list of customers and puts them in a vector. I did that. Next, there is a file for each customer that I put in this vector. I need to open the file, and "assign the data to a …

Member Avatar for iamthwee
0
109
Member Avatar for cl3m0ns

I am writing a program and one of my classes is called Employee the private variables for Employee class are string firstName; string lastName; I have a child class called StaffEmployee and for its private variables I would like to use int employeeID; I want to create an object in …

Member Avatar for twomers
0
330
Member Avatar for Butterflieq

I am going through and rechecking my work on a project and was hoping someone might see if I am on the right track. First off the project is as stated: A baseball team manager wants a report showing her players' batting statistics. A batting average is computed as hits …

Member Avatar for Butterflieq
0
231
Member Avatar for Ratte

I have a person datafile of many entries. Persons will be stored in a linked list and each of the person amongst other things will have a linked list of items belonging to them. The object of the program is to use a quicksort algorithm to print out entries of …

Member Avatar for Narue
0
117
Member Avatar for sugarflaps

Hi im trying to print out rows and columns using ascai characters to resemble pixels. I am trying to get the user to input the dn values for the array and then use these values to then print out the appropriate character. Im really stuck now and have been at …

Member Avatar for WaltP
0
280
Member Avatar for joshua.tilson

Good Morning, This is a bit of a double question thread. First what i have done is written a basic stop watch program, it runs through the loops and iterates the time on screen. My first question is this: is there some way to leave the program listening for user …

Member Avatar for Duoas
0
337
Member Avatar for kano
Member Avatar for Ancient Dragon
0
371
Member Avatar for g_loughnan

Hi all, Just have a curiosity about multiple inheritance. I have defined two classes, each of which returns a string to described an object of that class. I have also made another class which inherits from both of the above classes. I want to define a function in the derived …

Member Avatar for g_loughnan
0
68

The End.