49,766 Topics

Member Avatar for
Member Avatar for NvIs

My professor gave us an assignment to Convert the following 2 numbers to binary, octal and hex. 3.567, 0.032432 which would be easy if the numbers given weren't in decimals. I'm using the % operator and that can't be used by float... I'm lost. Can someone give me an idea …

Member Avatar for NvIs
0
124
Member Avatar for dunderMiflin

I am a 22 year old college gal currently enrolled in a c++ course, and we are on the topic of recursion. I understand how it works and have completed several other exercises on the professor has listed in the book, but this one has me stumped. Is there anyone …

Member Avatar for Insensus
0
234
Member Avatar for dalk8978

Can someone help me out with this program. Programming problem – This program must meet the following criteria: 1. Character reading loop: i. Requests the user to enter a character at the keyboard 5 different times. ii. Reads in each character using getchar () within the loop. iii. Verifies that …

Member Avatar for frogboy77
0
161
Member Avatar for Awilson089

Hi, I have a program which needs to accept a date, it can only accept under 30 days, and the entry has to be over 0 My problem is that it accepts anything, it doesnt make sense because i have used the exact layout on other bits of code which …

Member Avatar for Awilson089
0
102
Member Avatar for GhostMonkey

Hey, I've got this code that scans a 3x3 section of a 9x9 array. Heres the code: [CODE]for (j=x; j<x+3; j++) { for (i=y; i<y+3; i++) { if (array[i][j] == value) { cout<< "Number already used in Section" << endl; } } }[/CODE] It works fine if you start from …

Member Avatar for GhostMonkey
0
95
Member Avatar for Labdabeta

Is there any way to implement a scope change for the template keyword? I have a templated class with almost 100 different functions and my code looks disgusting with my external declarations. Is there any way to implement a scope increase for template? EG: [CODE]template <typename Type> class TypeClass { …

Member Avatar for Fbody
0
204
Member Avatar for Khoanyneosr

I'm REALLY angry! I've been trying to get this stupid code to compile for way too long now. I've spent 30 bucks on this book and the first code it tells you compile doesn't work! Here's a link to the code... [url]http://d3dcoder.net/d3d10.htm[/url] I'm sorry that you have to download that …

Member Avatar for Khoanyneosr
0
157
Member Avatar for Climber Ty

So this is my final project for my class. The idea is to use my RationalNum class (which is complete and works fine... I just didn't attach the .cpp since it was only the driver) and use it to add, sub, & multi polynomials (RationalNum being the coefficients i.e. 1/4x^3 …

Member Avatar for Climber Ty
0
477
Member Avatar for Cece Skies

receiving this error: error C2011: 'Placement' : 'class' type redefinition please help! this is due soon.

Member Avatar for Fbody
0
31
Member Avatar for Banf

so im starting in C++ programming and im working out of a textbook. At the moment im stuck on the question asking me to determine using an input(cin) whether an input is a lowercase or uppercase letter. I am particularly confused on how to determine if an input is upper …

Member Avatar for frogboy77
0
293
Member Avatar for cNew

Hi! What could be the best algorithm for "Merge Sort" where the memory must be used "most effectively"? I just know the standard way to do this, but that's not the most effective way how to use the memory. This is the only variant which I know: [CODE=c] #include <iostream> …

Member Avatar for Narue
0
210
Member Avatar for sha11e

I sometimes see people code like std::cin and stuff and say that it's bad to use "using namespace std;" Why?.....

Member Avatar for Fbody
0
172
Member Avatar for lukemuller

Hey guys, I've been having a bit of trouble with my c++ program i'm trying to create for an assignment. I'm still learning, but array's seem to give me the most trouble. I've been reading and searching google alot to try and find examples to help my situation, but i'm …

Member Avatar for lukemuller
0
2K
Member Avatar for parth09
0
54
Member Avatar for cblue

i know how to find prime numbers of several numbers, does anyone know hoew to find a prime sumber of a single number inputed by the ser using the following function and printing out if the number is prime int mai()//asks for input { int num; cout << "enter number:"; …

Member Avatar for pseudorandom21
0
213
Member Avatar for GulnazS

Could someone help me, please: How can I convert a cstring (Input math expression) into an array of integers and characters(*, +, etc.)? I know atoi function would return 0, if there are other characters, not digits. Is there a function to do it? I appreciate any help. Thank you.

Member Avatar for WaltP
0
51
Member Avatar for mas51

I have put together a program using a class AbstractSort that can be used to analyze the number of comparisons performed by a sorting algorithm. Anyway, I built the programs( I have 2 here) and the first one counts the passes but does not order the array created and the …

Member Avatar for mas51
0
408
Member Avatar for salty11

You are the manager of a travel agency with 20 employees. You have announced a promotional campaign for your agents to sell vacation packages. Each day you will enter the ID number of the agent (#1-#20), the number of packages sold, and the dollar value of the package. Entries will …

Member Avatar for salty11
0
428
Member Avatar for lilsid

i need help making this program i have to create a program that adds new customers if they arnt already in the database if they are calculate thier balance and if they wish to order anything that too alll in one program please help me ..

Member Avatar for Ancient Dragon
0
82
Member Avatar for HASHMI007

[CODE]//how can make this program by composite class.plz conver this program using composition...............................! #include<iostream.h> #include<stdlib.h> class point { friend class circle; private : int x,y; point (int xx,int yy )//:(int x(xx),int y(yy)){} }; class circle{ float r; point p1,p2; public : circle (){r=0;} circle (int a,int b,int c,int d){ p1.x=a;p2.x=b;p1.y=c;p2.y=d; …

Member Avatar for HASHMI007
-4
90
Member Avatar for complete

How is IXRTextBlockPtr used? I have a XAML file that is made by Expression Blend. But the Silverlight project that corresponds to it has to be in C++ instead of C# (it has something to do with being part of an embedded system). The automatically gernerated C++ code referrs to …

0
115
Member Avatar for fadi_1234
Member Avatar for fadi_1234

this game is between a player and computer can you make it between two player please ?

Member Avatar for VernonDozier
0
336
Member Avatar for w1mark

Hi. I've been working with linked lists for a bit, but I've been having some trouble with them. My programming book does a good job in helping you make a linked list, but it does a bad job of showing you how to use them. What I am trying to …

Member Avatar for w1mark
0
279
Member Avatar for lalala423

Hey all, So i created a program that performs matrix addition and subtraction. It compiles but when I try to run it, it shows "SEGMENTATION FAULT" Help Please! Here are my codes: Matrix.h [code] #ifndef MATRIX_H #define MATRIX_H class Matrix { private: const int numRows, numCols; int **data; public: //constructors …

Member Avatar for lalala423
0
162
Member Avatar for thecoolman5

hey, I use DEV-C++ and I want to know how to display text in a new windows project. this code that i used from an example doesnt work. [CODE]#include <windows.h> #include<iostream> #include<string.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class name into …

Member Avatar for thecoolman5
0
300
Member Avatar for Ninjaboi

In a nutshell: How can I statically link .dll files into my programs executable? I know it's possible, just have never done it before. I know there is also some issues that arise in doing so ( as well as bloating the executable's size ) but I'm still game for …

Member Avatar for Ninjaboi
0
2K
Member Avatar for mushahidh

CONVERT THIS QUICK SORT PROGRAM INTO PARTITION OF 3,5,7OR 11 ELEMENTS. [CODE] #include"stdafx.h" #include<iostream> using namespace std; #include <stdio.h> #include <stdlib.h> #define size 50 void swap(int *x,int *y) { int temp; temp = *x; *x = *y; *y = temp; } int partition(int i,int j ) { return((i+j) /2); } …

Member Avatar for Momerath
0
219
Member Avatar for toferdagofer

i wrote some code to take an array and run it through a function to reverse the elements of the array and then return a pointer to the new array. For some reason im not getting the results i want. It has to do with my reverseArray function. Specifically in …

Member Avatar for toferdagofer
0
106
Member Avatar for luislupe

I'm trying to build my first template function, but it generates a compile error when lines 21 and 22 are not commented. What I'm trying to do is to have a template function that can return multiset<int>, multiset<double> or multiset<string> depending on the attribute I want to extracto from the …

Member Avatar for mike_2000_17
0
328

The End.