49,761 Topics

Member Avatar for
Member Avatar for Labdabeta

Hello, As may be apparent from my previous posts, I am in a "If its worth doing, its worth overdoing" sort of competition with a friend of mine. Our goal is arbitrary precision integer arithmetic. I think I am close to getting the data storage working, but now I want …

Member Avatar for Labdabeta
0
998
Member Avatar for n.cramp

Ive actually managed to get DirectX 9 working with Direct X, however i am now getting odd error messages around a function. I can't see any syntax issues myself but thought i'd check to see if anyone can shed any light on it. `g_pd3dDevice->CreateVertexBuffer( 3 * sizeof(CUSTOMVERTEX) , 0, D3DFVF_CUSTOMVERTEX, …

Member Avatar for n.cramp
0
304
Member Avatar for Frank_5

//Author: Frank R. Mendez //Title: Object Oriented Bubble Sort //Description: Accepts an int array element to sort using bubblesort in ascending order #include <iostream> using namespace std; class BubbleSort { public: void bubble(int arr[], int size); void driver(); void display(); int arr[50]; int array_size; int temp; }; void BubbleSort::driver() { …

Member Avatar for mike_2000_17
0
4K
Member Avatar for arthur5645

i am trying to create acalcultor using a c++ program that uses mode. would you please show me how to create a calcultor that uses the mode function using a switch a statement

Member Avatar for rubberman
0
139
Member Avatar for MonsieurPointer

Hello everyone, I have a 2D array as follows: `double cornerPoints[4][3];` which is used to determine the four corners of a 2D bounding box of a curve. However, since I do not know how many curves are to be processed, I would like to dynamically allocate memory, knowing that the …

Member Avatar for MonsieurPointer
0
194
Member Avatar for nchy13

This is the code which put an extra line to the std::string array. I am here trying to print last k lines of file. Any help is appreciated. #include <iostream> #include <fstream> #include <string> using namespace std; //file.exceptions(ifstream::eofbit | ifstream::failbit | ifstream::badbit); void print_last(unsigned k, string file_name) { string *data=new …

Member Avatar for nchy13
0
823
Member Avatar for brenzy

#include <iostream> #include <string> using namespace std; class Point { int x; int y; public: Point(int seed = 0) : x(seed), y(seed) { cout << "Overloaded constructor called.\n"; } ~Point() { cout << "Destructor called.\n"; } int getX() { return x; } int getY() { return y; } }; ostream& …

Member Avatar for Ancient Dragon
-1
149
Member Avatar for avinash.jay.7

Im having difficulties in performing the frequency distribution of 6x6 matrix which was given..i solved it by the following way but it was wrong anyway because if i change any number in the matrix it will not calculate the number of times it occurs in the array.... need your kind …

Member Avatar for David W
0
2K
Member Avatar for arpha16

these is my problem. the user enter the password and the computer output "congratulation!" if the user guess the assigned password otherwise "try again!" how could i run these program. feedback a.s.a.p. thanks.

Member Avatar for rubberman
0
215
Member Avatar for nitin1

class A { public: protected: int i; }; class B : public A { friend void f(A*, B*); void g(A*); }; void f(A* pa, B* pb) { // pa->i = 1; pb->i = 2; // int A::* point_i = &A::i; int A::* point_i2 = &B::i; } void B::g(A* pa) { …

Member Avatar for rubberman
0
142
Member Avatar for Frank_5

//Author: Frank R. Mendez //Title: Object Oriented Queue //Description: This is program uses double linked list to store data in the queue its functions are enqueu,dequeue and display queue. //Hope it can help you in you future projects. Good vibes to all programmers! #include <iostream> using namespace std; struct Node …

Member Avatar for rubberman
0
2K
Member Avatar for Dannjeru2013

Kambo company pays employee Gratuity on retirement that can be computed using the Formula Gratuity=(Salary*Fixed Rate*Number of Years Worked)+One month Salary. Formulate an algorithm that can be used to calculate the gratuity and write a c++ program that can be used for the computation.

Member Avatar for JasonHippy
-1
466
Member Avatar for erinkay528

I am almost done with my assignment but am having problems with the spacing when I echo the file. Any help please? this is what I have: #include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; int main() { //Declare variables to manipulate data char reply; string name; …

Member Avatar for JasonHippy
0
154
Member Avatar for alex9620

Hi, This question is related to the below. http://www.daniweb.com/software-development/cpp/threads/352685/error-c3861-menu-identifier-not-found I used that to solve my issue. What I would like to understand is why the function prototype is to be declared before the main function? In my textbook that I am following the function prototype wasn't there. I did as …

Member Avatar for MandrewP
1
392
Member Avatar for nchy13

I stumbled upon the fact that one can't bind a temporary variable to a reference unless it is a constant and found it to be indeed true in the given code. However, i am not able to find out the difference in my other code snippet where I didn't use …

Member Avatar for nchy13
0
838
Member Avatar for rudasi

I have 2 processes (producer and consumer) sharing an int deque in shared memory, I have the producer process put 2 numbers in the deque and then it gets in a wait state losing its mutex lock. I then have the consumer process removing the numbers and printing them. It …

Member Avatar for rudasi
0
518
Member Avatar for imrankhan.mahzoon

How to Make a Program in Array that have 3 rows and 4 columns and the User Should Input the Data or Values

Member Avatar for chuksjoe
-3
100
Member Avatar for Fjdd

I use visual c++ compiler 2008 express edition, because express edition doesn't support resources is it possible to make a win32 dialog box in express edition, if so how might I create one? Thank you for reading

Member Avatar for Fjdd
0
4K
Member Avatar for phorce

Hello, I am having a few problems when trying to execute the a Makefile that will *hopefully* create a static library that I can use for future use. Here is my code below: #----------------------------------------------------------------------------- # Usage of make file #----------------------------------------------------------------------------- # Clean operation: # make -f MakeClient clean # # …

Member Avatar for mike_2000_17
0
784
Member Avatar for jandanielsaclolo

Hi there, I'm just new to programming and C++ ... I have trouble with my code At first I am using "int" for variables but then I realize that i need a much larger range of numbers and also support for decimal operations... My First Code: #include <stdio.h> #include <conio.h> …

Member Avatar for jandanielsaclolo
0
256
Member Avatar for frankleslie8311

// Author: Frank R. Mendez // Title: Object Oriented Calculator Program // Date: 7/13/13 #include <iostream> using namespace std; class Calculator { public: void add(int i, int a); void subtract(int i, int a); void mult(int i , int a); void divide(int i, int a); void modulo(int i , int a); …

Member Avatar for AndrisP
0
6K
Member Avatar for nchy13

This code only print characters until char value is 0 but surprisingly it output characters only upto first blank space. I checked their ASCII values and surprisingly ASCII value of space(' ') character was output by program as 0. I couldn't get it. Any help is appreciated. #include <iostream> #include …

Member Avatar for AndrisP
0
327
Member Avatar for Lp_baez

I keep getting this error on a sample that a c++ book provides. " **error C2660: 'std::vector<_Ty>::empty' : function does not take 1 arguments 1> with 1> [ 1> _Ty=std::string 1> ** ] " I have some suspicious what can be causing the error but I am not sure. the …

Member Avatar for Unimportant
0
296
Member Avatar for christinetom

Hi everyone.. Would anyone know where I could find a good explanation on 'Pipes' in programming. I'm trying to understand how I might go about using input into a GUI application to display output in a dos console. As I understand it, the concept of pipes comes into this somehow. …

Member Avatar for christinetom
0
146
Member Avatar for avinash.jay.7

hi.can someone help me to sort a two dimensional array.. below is how i sort a single dimensional array, i want it in a similar way... im just not good at managing the for loop... single array : #include <iostream> using namespace std; int main () { int M[5] = …

Member Avatar for tinstaafl
0
236
Member Avatar for gerd.brecht.1

ls -1 | grep ".h$" -> searches backwards findfirstchar '.' for file-type h [ C++ Header file ] ls -1 | grep ".cpp$" -> searches backwards findfirstchar '.' for file-type cpp [ C++ Source file ] etc...

Member Avatar for alaa sam
0
83
Member Avatar for ktsangop

Hello everyone! I would like your help regarding this: I have a tuple vector which i must iterate through, and accessing the vector data to decide wether to erase or not the current vector element. My code : typedef tuple <int, CString, int, int> pc_data; vector <pc_data> pc_vec; //Assume that …

Member Avatar for ktsangop
0
6K
Member Avatar for nchy13

I intend to perform in-place modification of std::string with the help of a modifier function. In this regard, I looked up on internet and found that pass by pointer method is not recommended. I have few queries in this regard. * If I pass a std::string to the function as …

Member Avatar for NathanOliver
0
939
Member Avatar for Yashaswi_1

I was using C++. As I was a beginer, I wanted to make some changes in the program. But when I tried doing so, the blinking cursor was erasing the other charcaters. So, can anyone kindly help me out in this problem as soon as possible. I'm in very urgency, …

Member Avatar for Moschops
0
235
Member Avatar for sevin1192

The End.