49,766 Topics
![]() | |
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 … | |
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 … | |
could you please help me? i need to write a program, no dynamic allocation, using classes and arrays to multiply only 3x3 matrices only | |
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. | |
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 … | |
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 … | |
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 … | |
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=" … | |
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 | |
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. | |
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 … | |
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 … | |
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 … | |
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] … | |
[code] int main() { const char* p = "Hello"; cout << sizeof(p) << endl; } [/code] Why this is 4 ? | |
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 … | |
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 … | |
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 "/\|;:'><!@#$%^"...? | |
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 | |
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 … | |
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 … | |
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 … | |
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 | |
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 = … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.