49,764 Topics

Member Avatar for
Member Avatar for np2100

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 …

Member Avatar for np2100
0
301
Member Avatar for wambooman

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. …

Member Avatar for Duoas
0
125
Member Avatar for Ken JS
Member Avatar for MNDGAM

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) …

Member Avatar for vmanes
0
104
Member Avatar for brlukosk

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]/** …

Member Avatar for brlukosk
0
4K
Member Avatar for alcoheca

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; …

Member Avatar for Narue
0
264
Member Avatar for wijitha

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 …

Member Avatar for vijayan121
0
289
Member Avatar for tonyaim83

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 …

Member Avatar for vijayan121
0
105
Member Avatar for rajdeep.mm

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

Member Avatar for Ancient Dragon
0
66
Member Avatar for alcoheca

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 …

Member Avatar for Nick Evan
0
864
Member Avatar for n.aggel

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} …

Member Avatar for n.aggel
0
99
Member Avatar for DamiLeon

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 …

Member Avatar for wambooman
0
85
Member Avatar for rajdeep.mm

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 …

Member Avatar for Ancient Dragon
0
29
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
121
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
144
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
96
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
112
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
110
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
87
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
114
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
86
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
42
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
118
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
128
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
146
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
70
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
142
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
146
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
125
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
87
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
126
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
60
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
98
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
113
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
332
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
234
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
121
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
282
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
343
Member Avatar for kano
Member Avatar for Ancient Dragon
0
373
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
Member Avatar for ramu61

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 …

Member Avatar for zandiago
0
223
Member Avatar for kano

u konw how the name c++ developed? or wat does c++ stands 4. c++ is originally named c with classes.

Member Avatar for WaltP
-1
64
Member Avatar for TAboy24

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 …

Member Avatar for ithelp
0
77
Member Avatar for vigneshvh

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 …

Member Avatar for ithelp
0
106
Member Avatar for toolmanx

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 …

Member Avatar for toolmanx
0
135
Member Avatar for g_loughnan

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 …

Member Avatar for g_loughnan
0
91
Member Avatar for Ahmed Padela

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]; …

Member Avatar for Ancient Dragon
0
71

The End.