49,764 Topics
![]() | |
I am still just a beginner and i made this average program. It worked out just fine. THen i decided I wanted to make it say like the grade you got such as an A+ or C. Anyway after I add all the grades and divide them by the number … | |
what I want to do is replace the spaces inputted to '~10' text. I input a string a1. I change the string to a char array names SA so I can go through each char. if the char[i] is a space, I want to append ~10 to the sa string. … | |
anybody knows how to read & write .avi file? | |
Im trying to Write a Recursive funtion that computes F(n) = 2 + 4 + 6 +...+2n using pass by reference.. here is the code I have [code=c++] #include <iostream> #include <iomanip> #include <cmath> using namespace std; int F(int &); int main(){ int n; cout <<"Enter n for computing F(n) … | |
Hello all! New here at daniweb. I am working on a function to check the validity of a sudoku puzzle. It must check the 9x9 matrix to make sure it follows the rules and is a valid sudoku puzzle. this is what I have come up with so far: [CODE]/** … | |
hi, I'm checking a date is valid as it's typed in, however I always want to allow the user to skip with a CR. The while condition is causing my program to crash when [B]str_date.length()==0[/B] (I think) here's my code: [CODE=c++] struct Date { int d; int m; int y; … | |
hi.. I'm new to ACE framework. I want to develop a server which has multiple ports and multiple clients can connect with the server simultaneously. I tried to do it using a ACE_Event_Handler objects witch registered with ACE_REACTOR. But i could not achieve what i want. If you have idea … | |
Hi My problem statement is as follows :- I have set of processes all having unique name say PROG,PROG1,PROG2 etc. Now with each of these processes different integer values are being associated say min_time, max_time,median_time. What i want is to create a map of all these processes and associate the … | |
hi, can anybody provide me with a C++ code to check if a dll file is currently in use without using the microsoft framework. i mean right now im doing it using the GetProcessesByName() method. Is there any way i can do it without the use of this method | |
Hi I wish to break up a date entered as a string into [B]int[/B]s for day, month, year. String to be entered follows this convention DDMMYYYY - this will be checked so we can presume it's suitable. I have it working using tempary variables, but is there a way to … | |
hi lets say you have a big application and you want to break it up to many files... The ideal would be if you can have the application in one .c {i.e main.c} file your types and includes in another file {types.h} and your functions in a seperate file {functions.c} … | |
Hi, I am supose to do a program in C++ that tests for a password it should do the following: a- the password should be between 6 and nine characters b- the password should contain at least one upper case and at least one lowercase letter c- the password should … | |
hi all, i am using RougeWave CTLib code to connect to a sybase database. can anybody pls guide me as to how i can modify this code to be able to connect to a unicode database. The ct_command() takes the sql query in char format. how can i pass 2 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
hello everyone.. please help me with my program. Please help me solve a program that could accept more than 10 digits. Thanks | |
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 … | |
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 | |
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, … | |
[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 … | |
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 … | |
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 … | |
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 … | |
// 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 … | |
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 … | |
[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 … | |
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; … | |
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 … | |
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 … | |
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 … ![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
| |
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 … | |
hi folks, i m really fed up these problems....please help me 1.Create a program that implements a database in C++. The fields are hard-coded, and the data is saved in a binary file. Although this isn't really flexibility, you aren't relying on any external libraries or functions. 2.Write a program … | |
u konw how the name c++ developed? or wat does c++ stands 4. c++ is originally named c with classes. | |
I just started to study C++ by myself and having troubles..lot of troubles i especialy with (6),(7)...anyone knows CPP well enaugh?thank you people..... I'm trying writing a program including information about a student in college: (1)id number of the student (2)name of the student-static string of 20 (3)pointers array of … | |
hai i am a new user of this site ,i think its helpfull to knowmore about the subject,i want to know that how i can train my self in c++ for doing a projest, and what do all expect form doing a project in c++,kindly,give sujessions 4 me preparing a … | |
Since I closed my thread, I will just open this new one for a comment. I told you I had discovered an item in WinHelp called: "Opening and displaying a bitmap file" If you want a laugh when you get bored, pull that up and look it over. I wonder … | |
Hi there, I'm trying to create a demonstration of a modified copy constructor. As can be seen from the code below, I've created a class called Track and defined a copy constructor such that a new object of type "Track" can be defined with the same track artist and album … | |
After compiling the program, total 12 errors apreared. Please help me to resolve. All errors are shown in attachment. [code=cplusplus]#include<iostream.h> #include<conio.h> void Merge(int[],int,int[],int); void main() { int A[50],B[50],C[50],MN=0,M,N,z; clrscr(); cout<<"How many elements do U want to create first array with?(max.50)....."; cin>>M; cout<<"\n Enter first array's elememts[ascending].....\n"; for(int i=0;i<M;i++) { cin>>A[i]; … |
The End.