49,766 Topics

Member Avatar for
Member Avatar for emlinux

hii to all i am very new to c++ . i am learning c++ while i try to compile this program it give error as "pair as ambiguous symbol" error. in this program iam trying to understand the how polymorphism works. #include "stdafx.h" #include <iostream> #include <conio.h> #include "mouse.hpp" using …

Member Avatar for Ancient Dragon
0
68
Member Avatar for mrar85

im' confuse with this function...how do i call one function so it can be used in another function?? [ICODE]#include <iostream> #include <cmath> using namespace std; double pi=3.1416; double getinput(); double distance(double,double,double,double); double radian(double); double circumferences(double); double area(double); double diameter(double); void displayresult(double,double,double,double); int main() { double x1,x2,y1,y2; double rad,perimeter,areas,dia; cout<<"Please enter …

Member Avatar for mrar85
0
164
Member Avatar for cmb2thim

could you please help me? i need to write a program, no dynamic allocation, using classes and arrays to multiply only 3x3 matrices only

Member Avatar for daviddoria
0
61
Member Avatar for qvyhnl

So i have an original char * s with size of n; Can someone show me how to create another char * p with twice the size of s? and then fill p with 2 copy of s? Thanks.

Member Avatar for qvyhnl
0
102
Member Avatar for Nathaniel10

I was already thinking along ARKoenig's suggestion and revised my code to use arrays. It was working pretty well until I made some minor changes. Now it loops non-stop without any prompt for the player to make a play. I am sure it is a small error, but I can't …

Member Avatar for Nathaniel10
0
163
Member Avatar for r3s3v0ir

Good evening guys.... i'm newbie in here and in c++... while i in the middle of pratice in making program... i try to make a stack that can check whether the string that user input is palindrome or not. i'm using visual studio 2010 and get autos error this is …

Member Avatar for Taywin
0
233
Member Avatar for Jake1905

I am completly lost on this could someone point me in the right direction into where I am going wrong with this code. [CODE]#include <iostream> using namespace std ; int main() { int x ; int y ; int temp ; int remainder ; // read in the two integers …

Member Avatar for ixmike88
0
101
Member Avatar for burcin erek

i made a test program, this line " *ps.Working_Hours=10;" generates mistake. why ? [CODE]#include <cstdlib> #include <iostream> using namespace std; class Salary { public: int Working_Hours; float hour_rate; float x; }; int main(int argc, char *argv[]) { Salary s; float yy; s.Working_Hours=7; s.hour_rate=30.5; Salary* ps; ps=&s; *ps.Working_Hours=10; cout << "s.hour_rate=" …

Member Avatar for burcin erek
0
178
Member Avatar for jvibez

write a pseudocode algorithm tp prompt the user to enter a number and it should tell if the number is odd or even.........i need help

Member Avatar for daviddoria
0
48
Member Avatar for mogaka

am new to c++. i want to create a desktop application but i don't know how to create a user interface-forms like vb.ne forms using dev c++ IDE. how do i go about it.

Member Avatar for daviddoria
0
222
Member Avatar for tKc

I need help in using 2d arrays in c++. I want to output a table that looks like this 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 …

Member Avatar for daviddoria
0
167
Member Avatar for iarkey

Ok i've got this simple code to encrypt a msg with a private key. When i run the app it crashes. Any help? [CODE]#include <stdio.h> #include <string.h> #include <openssl/rsa.h> #include <openssl/pem.h> int main() { char keyy[] = "Private key here"; unsigned char *key = (unsigned char* )keyy; printf("%d\n",sizeof(keyy)); RSA *public_key …

Member Avatar for daviddoria
0
91
Member Avatar for beatenbob

I'm trying to write a program which uses 4 class files. However, I've got some issue regarding the error I got from cygwin using g++ command, it says Calling fdopen: bad file descriptor when I try to include the files I need on top of my header files. I'll show …

Member Avatar for beatenbob
0
462
Member Avatar for Nathaniel10

Is it possible to have an array as a class member? It is part of my Wumpus Hunt exercise. I want to do the following: [code] class Room { blah blah; }; int main() { for (i = 0; i < 3; i++) { Room adjacent[i]; blah blah; } [/code] …

Member Avatar for Nathaniel10
0
109
Member Avatar for vbx_wx

[code] int main() { const char* p = "Hello"; cout << sizeof(p) << endl; } [/code] Why this is 4 ?

Member Avatar for nbaztec
0
98
Member Avatar for gmfreak1991

Hey, I'm writing a wheel of fortune game and trying to figure out how to make the game update what players turn it is. It is assumed that there is only three players, and the variable "int players = 1" is defined globally, so if I change it in the …

Member Avatar for Fbody
0
174
Member Avatar for philipB

My teacher has given me an assignment to parse a text file that contains no more than 25 "Students" the Student object has a Name, and five grades contained within an array. Now, I've set up the Student file, the Array template file per his instructions and i'm reading in …

Member Avatar for Taywin
0
106
Member Avatar for tmantix

Hey, This is probably a newb question, but what all can a string type variable hold? Is it restricted to just letters or can it hold things like "/\|;:'><!@#$%^"...?

Member Avatar for tmantix
0
236
Member Avatar for chibon

Hello all i need help with my school project which is to create c/c++ program to demonstrate the AI problem of coloring the Australian map With Forward Checking, i Kind off dumb when it comes to c/c++ anyone can help me with the source code? Thank You

Member Avatar for Fbody
-3
132
Member Avatar for centerline00

O.K., I have a project I'm working on. It uses 8 classes (I'm only showing 2 and main). It gives me a "bad_alloc" error when the obj is instantiated. When obj is removed it works fine (or call the personType class that "should" be inherited from extPersonType.) Any thoughts of …

Member Avatar for Fbody
0
236
Member Avatar for enkidu75

I am making a program for my class where I handle equation problems such as: 2a-3b+5c=10 3a-2b-3c=-5 where the answer would be: 5a-5b+2c=5 This is what I have so far. It still isn't perfect cause I still haven't figured out the "=" part. I do have it performing the math …

Member Avatar for StuXYZ
0
168
Member Avatar for georgy9002

Hi could someone help me with my existing code !? I need Write an OO program using two Classes to create a guessing game in which the user must guess a number between 1 and 100 . The user is given a maximum try of 10 tries to guess each …

Member Avatar for StuXYZ
0
95
Member Avatar for fakiha erum

sir i am being given a task to make a program which evaluate the fictorial of a given number, using loops. please guide me who i could do this

Member Avatar for Nick Evan
0
158
Member Avatar for atoivan

i need help with a program i am writing a in c++ and Java .a program that when i input a figure like 2345 it will sum the figure up by adding 2+3+4+5 can any one help some one give me some code int a = 0 int i = …

Member Avatar for atoivan
0
89
Member Avatar for jeffpro

I have a program that works on Windows XP but when I try to run it on Windows 7 I get this error. Debug Assertion Failed! File: c:\program files\microsoft visual studio .net 2003\vc7\atlmfc\include\atlcomcli.h Line: 148 Expression: p!=0 I've googled for hours.

Member Avatar for arkoenig
0
108
Member Avatar for networkZombie

I have to write a program for computer science that takes in the total amount of goods your buying and what amount your paying with and then outputs how much change you will receive. So for example your buying something for $3.99 and you have a $5 bill then it …

Member Avatar for jonsca
0
163
Member Avatar for ShontiD

Using Visual Studio 2008...My assignment is to use the file SalesData.txt to load an array of structs, and use the array of structs to show to the screen a control-break report which breaks with each change in salesperson and shows each salesperson's total sales. I have not finished but I …

Member Avatar for Ancient Dragon
0
144
Member Avatar for PinkyMV

Hi all, I'm new to programming and I am currently taking an intro class that is requiring me to create Wheel of Fortune in c ++. I've made some decent head-way (I think), but I'm still far from getting this right. Here's what I have so far: *NOTE* The function …

Member Avatar for dexter321
0
3K
Member Avatar for gmfreak1991

Hey i'm doing a project, and i'm at the part where the user must enter a phrase or sentence and it must be compared to the phrase or sentence already imput to the computer via file. I'm asking a user to enter the sentence / phrase using cin.getline, but when …

Member Avatar for gmfreak1991
0
2K
Member Avatar for baconswife

Hello, for some reason I am having trouble remembering how to make it exit when they push the number 9. Can anyone help me? Also, I need it to repeat rather than at the end saying "press any key to continue" I know I will do this using while (choice …

Member Avatar for baconswife
0
250

The End.