Hi. I am working on an assignment writing the implementation for a class of playing cards.
http://www.pic.ucla.edu/~nathan/cgi-bin/moin.cgi/la1#head-111d7fc9df65f327018fa94234ab0b23c0857e98
Here is the header file that we were provided.
//filename card.h
#ifndef CARD_H
#define CARD_H...
Let me start a Quiz based on c++ programming in this thread.
You are requested to give the right answer in quotes;
RULE:
No special rules are there.Anyway,
>>The person who tells the right answer must post the next question,No one must post Q's in between.
The person who answers must post a...
Homework Statement
I just started my C++ courses and here is my question.
Homework Equations
The Attempt at a Solution
//This program states whether a given year is a leap year or a non-leap year.
#include <iostream.h>
#include <conio.h>
void main ()
{
int year...
I wrote a little test program to try to figure out some problems I am having in another program I'm working on.
# include <iostream>
# include <string>
using namespace std;
void ahoy(string nameEntered)
{
cout << "Ahoy, " << nameEntered << "!" << endl;
}
int main()
{
string...
Gaming! I would like to have some Games..coded in C++
I would like to have some Games..coded in C++...
If someone have those..please post it here for me...please...
Hi,
can anyone help me ?
I want code (program) to solve Gaussian Elemination by C++ .
Please Help me and I will really appreciate your time and effort in
helping me in my assignment.
Thanks.
Help me please (Gaussian Elemination by C++ )
Hi,
can anyone help me ?
I want code (program) to solve Gaussian Elemination by C++ .
Please very important
Hi,
I've a basic knowledge of c++, but I've never learned graphing. What little I know, I've picked up myself. I am trying to graph the motion of a projectile launched with a given speed and at a given angle, but the graph doesn't complete. Also, its very spaced out. I know its a parabola so I...
I'm trying to learn C++ and am using Cygwin. When I try to compile my program I get the message
/cygdrive/c/DOCUME~1/Stoffe/LOKALA~1/Temp/ccQt0yU6.o:driver.cpp:(.text+0x9d6): undefined reference to `Person::~Person()´
What is this kind of error?
Is it POSSIBLE to integrate C++ with WITec Project 1.88? urgent call for help~ haha
hi everyone,
currently i am doing a project in which i have to extract date MANUALLY from the solfware. It will be VERY tiring because the number of data I have to extract is more than 1000 times! Moreover, I...
I've been trying for days to get my boyfriend's C++ program to work, and I am almost ready to concede defeat, but I have frequented this site in the past as a lurker, actually learning a lot of what I know from the tutorials (thanks!).
Now, I have a problem I just can't seem to solve.
The...
I'm trying to write an address book that is based on a binary tree. I'm devloping in Visual C++ (I blew up my Ubuntu with the new dist), starting with the basics:
#ifndef binarySearchTree_h
#define binarySearchTree_h
#include <string>
#include <iostream>
using namespace std...
C++ program..Help!
Well i am working on an online banking system.Here is my code(not so ood but its a start)
#include <iostream>
#include <string>
using namespace std;
void header()
{
cout<<"\t\t\tWELCOME TO ONLINE BANKING SYSTEM"<<endl;
cout<<endl;
};
int getacctno();
int...
I need to write a program that prompts me to enter a positive integer N, after doing so it calculates the factorial of that integer and prints it. I am able to do this with the following code.
#include <iostream>
using namespace std;
int main()
{
double I, N, Factorial = 1; // Do not...
Hey guys,
I need a little more help here with this C++ stuff. Can anyone give me some help on how to give the meaning of these declarations:
1) const int a;
2) int const a;
3) const int *a;
4) int *const a;
5) int const * a const;
Any help would be appreciated as i am new to c++ and...
Hey.. I'm having trouble achieving this in C++...
I'm trying to do an opperation but keeping only 2 decimals, and floor rounding.
((3.52 * 4.32)/3.26) + 2.34
So I have 3.52 * 4.32 = 15.2064, but then I just round to 15.20
then 15.20/3.26 = 4.662576687116, but then I just round to...
Today, I tried to translate the very basic "solve quadratic equations" program I made a while back in Python to C++.
[SIZE="1"] #Solving quadratic equations
import math
print
print "Please enter information in accordance with ax^2 + bx + c = 0"
a =...
I was trying to understand how structs differ from classes in c++ and I came across this:
http://carcino.gen.nz/tech/cpp/struct_vs_class.php
I was wondering.. when would you choose to use a struct in c++ rather than a class?
Hi, I am trying to display all the records stored in a file(Banac.dat) but the program keeps on returning the first record over and over again in an endless loop ( i think its endless). If anyone could help me, it would be appreciated.
For the sake of simplicity, I've only included the...
I need to know if there is a difference between programming in borland c++ and microsoft visual c++.net. Are the two languages compatable or did microsoft introduce some new syntax?
Can I learn just the borland version without worrying about using the visual version later? Which versions are...
hey people,
Im a beginner when it comes to programming and i have just stated C++..Im finding it a bit hard and boring but its only the beginning, so i think that it would get better as i move on...Anyway i need some help with these questions...
BTW for your info: I am using a book called...
Can anyone help me understand the basic use of pointers.
I am aware of pointers,yet I feel that a program can be made more
easier without using a pointer.
My basic dout is that can pointers be used to save memory by dynamic declaration of variables.
I thought over it but found that using...
please help me !c++ projects
hi guys,
I am a 12th student.
i am in a great trouble !
My teacher wants the name of my computer project tomorrow!
pls give me some ideas for it.
graphics are not allowed& it should have classes etc.
teacher recommended some billing&management projects
pls...
I learn to code in the c language. i am learning the workings of C++, and Java.
I already have a c/c++ compiler in my computer. My problem is:
How do i "check for errors"/debug a c or java program? Are there any good tutorial online?
i m having serious problem regarding this program...i m not asking u 2 make it for me...just help me with logic because i can't get gist of it...pleasezz i need help...i ve working on it like 3 hours nd its like my mind has gone blank:(
urgent help with c++ program for series
i want to form program 2 sum this
pie=4[1-1/3 +1/5 -1/7+... 1/n]
{
int n,z,i;
float x,y,pie;
cin>>n;
i=0;
while (i<=n)
{
y=1/((2*i)+1);
i=i+2;
}
for(z=1;z<=n;z=z+2)
{
x=1/((2*z)+1);
}
pie=4*(y-x);
cout<<pie;
}...
I need some help. So far I have some for loops that print the following patters:
*
**
***
****
*****
******
*******
********
*********
**********
and **********
*********
********
*******
******
*****
****
***
**
*
Here is the code:
for(int rows=1;rows<=10;rows++)
{
for(int...
i've just started studying programming...nd i can't understand how to write these programs:
1:to recognize palindromes using goto condition
2:to recognize palindromes using for loop
3:to convert binary into decimal nd decimal into binary
i m seriously lost nd can't understand for...
Hello,
I am trying to print an equilateral triangle, made up of * (stars), of height 8. Can someone please give me some hint. I am not getting the desired output. Thank you. Here is my code.
#include<iostream.h>
#include<iomanip.h>
void main()
{
int n=8;
for (int row=1...
I tried to convert from C++ to visual C++ .NET but got many errors. (I haven't used C in years) If anyone can do this for me, I'd really appreciate it.
Please convert the following to visual C++ .NET code (to run on microsoft visual studio 2003 .NET)...
I'm trying to come up with a C++ program that reads input from a text file. Each line of this text file has a different variable. I have different data types (int, string, char). I'm having difficulty to read strings with spaces and read char's. The rest seems to work fine. If possible, I'd like...
If I take a six digit number and store it in one variable, how can I place spaces between each digit at the output. This would be so much easier if each digit were stored in separate variables.
--thanks
Just curious if there was any difference between the following two set-variable style functions for member variables interms of effiecieny
CType& Member(void) {return _member; } //Used in David Eberly's Code
void Member(CType const& tp) {_member=tp); }
Is there an actual difference?
Also...
I'm just finishing off my C++ project and I decided when looking at two functions that they would be far more efficent as one function (because they are always used together and as it was it repeats the same code twice).
Now I wanted my output as an array so I could called on the two needed...
Hi,
Has anyone here used the complex C++ class before Header <complex>? I am trying to do something VERY straightforward but there doesn't seem to be any way to do it!
Basically, I define a complex, and then want to re-asign its real and imaginary parts:
complex<double> A(1,1); //...
I know I am not a moron but this C++ is killing me, I have to write a program using functions to convert temp between c, f, k I am hung up
// Mod4project2tempconvert.cpp : Defines the entry point for the console application.
#include <iostream>
using namespace std;
double ftemp (double...
I have to answer a homework problem due today that I am not sure how to do the problem reads.
"Write a program that calls a void type function to find the maximum of three given integer numbers"
We use visual studio.net, any help would be appreciated and I would like to be able to compile it...
Just been introduced to the world of C++ as I'm taking a course on it in my maths degree. We are asked to write a simple program that takes in 3 numbers, sorts them in terms of order and then outputs them.
Not going to type my full program as that would probably be a waste of your time but...
umm, anyone who could help me write a code wherein, given an input file, it searches for a word inputed by the user, then outputs the result (how many times it appeared in the input file) in an output file. This program also uses 2 command line arguments. The first argument is the word to search...