49,757 Topics

Member Avatar for
Member Avatar for look@me

i have a small problem in my ass and i dont know how to solve it the problem is: [B]This problem is a game where n objects are arranged in a circle and every mth object is deleted until 1 object is left. The original problem is said to derive …

Member Avatar for VernonDozier
0
103
Member Avatar for Run.[it]

Weve been given this example to work with and Im not sure about the line 9 [B][I]char cont = 'n';[/I][/B] - is there even a need for it? The rest of the program I understand. [code=c++] #include <iostream> #include <stdio.h> using namespace std; int main() { int no = 1; …

Member Avatar for Run.[it]
0
146
Member Avatar for sfurlow2

We're supposed to write a function that calculates both the x and y coordinates of the upper left corner of the square that just contains a circle, given the x and y coordinates of the center of the circle, and the radius of the circle. Return the x and y …

Member Avatar for VernonDozier
0
120
Member Avatar for mzdiva041986
Member Avatar for VernonDozier
0
84
Member Avatar for agenthobbs

I am creating a program to manipulate structures that are similar to linked lists. The problem i am having is in a text file that i am reading in there are delete lines like this. d 1 2 d 2 3 d 3 4 d 2 0 with the first …

Member Avatar for VernonDozier
0
116
Member Avatar for quophyie

Can one of you gurus give me some help please. I am a new programmer so please bear with me. I have a header file called Deck.h and a cpp file called Deck.cpp. In my header file, I have a class called Deck which has prototype function called createPack as …

Member Avatar for quophyie
0
370
Member Avatar for Lensva

[code=c+] #include <iostream> #include <string> using namespace std; int main() { string a; cout<< "enter string" <<endl; cin>> a; string b; //======================================================== for (int j=a.size(); j>0; j--) { for (int i=0; i<a.size(); i++) { b[j]=a[i]; } } cout<< b <<endl; return 0; } [/code] i want the first character on …

Member Avatar for Lensva
0
121
Member Avatar for Ben10

Q- Use swapping concept to swap the elements of 1D array consist of 10 integers. Ask the user to enetr the values of array elements then print them out to the screen before and after swapping. e.g. a[0] ----> a[9] a[1] ----> a[8] a[2] ----> a[7] a[3] ----> a[6] a[4] …

Member Avatar for Ben10
0
213
Member Avatar for cedtech23

I'm trying to create an array that will hold the first name of 100 users I tried char fname[100] but I realized that only creates an array that hold 100 char. how do you create an array to hold 100 entries that has a max of 50 chars in each …

Member Avatar for Ancient Dragon
0
170
Member Avatar for octavia

Hi all my friends, As i'm beginner in VC++, i encountered a lot of problem in debugging. I think my knowledge and academic studies should be distinguished properly. I know only c++ but i have OOP knowledge in c programming. But i am not able to handle the debugging in …

Member Avatar for Ancient Dragon
0
324
Member Avatar for demroth

I am trying to match a string to see if it follows a given pattern. I have seen this example in my Orielly books but do not understand the logic. Here is the a small snippet of example code: [code=cplusplus] const string digits("0123456789"); const string float_digit = digits + '.' …

Member Avatar for Rajith Cherian
0
117
Member Avatar for LSUinotep

I am in the process of making a bank account class. I need to put a copy constructor to compare the checking and savings account. Also I need to learn how to insert the checking and savings accounts. I need an assignment operator to assign the checking account to the …

Member Avatar for VernonDozier
0
167
Member Avatar for charlez40

Hey everyone. Before i start i'm writing up this code for my mothers employee database. I have attached two files. An example of how it's going to be run through a picture and the employee database which is a .txt file containing data such as first name, last name etc. …

Member Avatar for Rajith Cherian
0
109
Member Avatar for farag

Hi I have a homework program to convert from postfix to infix, almost most of the functions are done but i can't make few functions to make the program run correctly Please help me finishing the remaining functions Here is the code [CODE]//------------------------------------------------------------------------------------------------------- // NextToken.h #ifndef NEXTTOKENH #define NEXTTOKENH #include …

Member Avatar for WaltP
0
147
Member Avatar for agenthobbs

Ok i am writing a program to manipulate structures that are similar to linked list. I have a file that has these contents. 4 5 0 0 0 0 1 0.1 0 2 0.2 0 3 0.3 0 4 0.4 1 0 1 1 1 1.1 1 2 1.2 1 …

Member Avatar for agenthobbs
0
162
Member Avatar for USUAggie

Hello all, I am having a bit of trouble overloading the [] operator on a template based LinkedList class. Could you all tell me what I am doing wrong? Thank you so much. Basically it is to provide my template based linkedlist class to act as a normal array. Here …

Member Avatar for USUAggie
0
220
Member Avatar for adnanius

Hi, I'm trying to 'reduce' a vector using the erase algorithm within a for loop. The idea is to scan a table looking for equal successive elements. Once equal elements are found, it erases one of the 2 elements. I'm suspecting a problem in the for loop, due to the …

Member Avatar for adnanius
0
300
Member Avatar for hockeyplayer051

Ok guys, our C++ class is winding down and for our last assignments we are getting some tough problems. We are asked to write a telephone directory program that looks up phone numbers from a separate file that contains a list of names & numbers. The program should prompt the …

Member Avatar for Ancient Dragon
0
86
Member Avatar for linux0id

Hello everyone! I am writing a function to multiply two matricies together. I have written a simple algorithm for a matrix 3x3 - [CODE]void multiply() { int a[3][3], b[3][3], c[3][3], i, j , p, val = 0; a[0][0] = -1; a[0][1] = 0; a[0][2] = 1; a[1][0] = 5; a[1][1] …

Member Avatar for linux0id
0
82
Member Avatar for Lukezzz

I know there is a function that if you put the mousecursor over a buttoncontrol, it is possible to have a litte "window" that occur over this button that tells what this button does. I have looked into the members and seen something like this. I am not sure if …

Member Avatar for Lukezzz
0
135
Member Avatar for resduq

hi everyone for my comp sci class i'm supposed to write a piece of code which will take in 10 ints and put them into an array of such size. unless the input is either a 3 or 7 in which case wats left of the array will be written …

Member Avatar for resduq
0
230
Member Avatar for Lukezzz

I have a general wondering about std::vector<string>. If you declare something like this, I have set 1 million elements to this vector. If I run this program just declare it like this without filling the elements with any strings. Does this take up any RAM memory just because I have …

Member Avatar for Lukezzz
0
150
Member Avatar for davye_l

I am creating a program on eclipse with multiple classes, using polymorphism. When I compile, I got the following error....Make:***[5] error 1, undefined symbol: do someone know what it is?

Member Avatar for Ancient Dragon
0
372
Member Avatar for rje7

dear all, wat should i do to clear the input buffer stream? and also make me clear regarding flush and fflush. both do the same functions?

Member Avatar for rje7
0
108
Member Avatar for nelsonsu

when i running this program, i've found that one of the used integer always over load. that is int outq. could someone please help me find out what's make this integer over load at last? thanks. [code=cpp] #include <stdio.h> #include <stdlib.h> #include <time.h> #include <fstream> #include <iostream> #include <string.h> #include …

Member Avatar for nelsonsu
0
142
Member Avatar for Jennifer84

If I want to find the start and end position of the word "how" on these two rows in a textBox. Is there any other approach then substring each line or is it the substring method I am going to use. ? //text in textBox Hi, how are you good …

Member Avatar for Jennifer84
0
123
Member Avatar for RossSCann

I am now using Visual C++.net 2002 edition. My main ongoing project, an application that teaches the game of bridge, is now 350 K + llines of code, 95 % of which is application logic. The 5% dealing with GUI is just SDK for speed. I am just a retired …

Member Avatar for RossSCann
0
175
Member Avatar for gehad3003

Hi I want to have a variable that contains item number. int didn't work because i want to make the item number start with 3 or 4 zeros. if i use char * I can't increment the value of char? any help will be appreciated

Member Avatar for gehad3003
0
161
Member Avatar for SamiMarufi

Hello everyone, im not as totall a newbie in C++ but when times come to make a mini project for semester n started to make it , then i assume as im a newbie. (well im in 2nd semester) I m trying to make a project which clear most logic …

Member Avatar for skatamatic
0
124
Member Avatar for nelsonsu

as the problem i'd met b4: [url]http://www.daniweb.com/forums/thread115104.html[/url] there's another problem looks like same with that problem, is about the logic of the int outq. this make the result1.txt always get unknown words after few loops. i'd like to know how to correct it. [code=cpp] #include <stdio.h> #include <stdlib.h> #include <time.h> …

Member Avatar for nelsonsu
0
86

The End.