49,761 Topics

Member Avatar for
Member Avatar for eshalmj

[I]Could somebody please help me in this C++ program? I'm a beginner and have no idea doing this tutorial. anyone who could help me would be greatly appreciated. here is the question: [/I] Create an inheritance hierarchy that a bank might use to represent customers’ bank accounts. All customers at …

Member Avatar for divyakiran
0
884
Member Avatar for phorce

Hello, I have a map that contains the alphabet (key) and a double (value) and I would like to sort the list so that the highest value is at the top but it still keeps it's key.. E.g. [code] #include <iostream> #include <map> int main() { map<char, double> alphabet; alphabet['a'] …

Member Avatar for vijayan121
0
134
Member Avatar for youngyou4

Hey guys, I have an assignment that I have been working on for hours and I've done a lot of testing and I finally got it working, but when I try to change it to make sure to prompt the user for an input I can't get it to work …

0
75
Member Avatar for nuclear

Theres this thing that i dont fully understand. Im using this tutorial: [url]http://lazyfoo.net/SDL_tutorials/lesson08/index.php[/url] and i in here we first set up some surfaces with text and then asign their value to the message and then for some reason we have to reset the message value to 0 in order for …

Member Avatar for raptr_dflo
0
483
Member Avatar for fsefsef23

I'm finding myself stuck trying to simply get a userInfo class's sets to work, but every time I try and compile with simple code like this in my application file: userInfo stuff; stuff.setId("test"); It gives me one of those 'undefined symbol' errors and references to the userInfo::setId function: Undefined first …

Member Avatar for Moschops
0
161
Member Avatar for bwilson1

I know its bad to wait last minute ,but I have been working on the code the last couple of days with no result ,and now I'm finally starting to panic.I am having trouble with my program. I have been working on it for the last couple of days. I …

Member Avatar for Schol-R-LEA
0
181
Member Avatar for otreblag

Hi, First post here. I need to scan a file (NC milling output) with, potentially, tens of thousands of lines of text, looking for keywords. Every time I find a keyword, say, a tool change command, I want to print out twenty lines - the ten lines above this line, …

Member Avatar for otreblag
0
130
Member Avatar for IT FRESH

WHT!!!! [u][b]i dont know whats wrong but i tried to to Merge both codes the if - statement dont show ...[/b][/u] [code] #include <iostream> #include<cstdlib> #include<stdio.h> using namespace std; /** Showing the introduction screen and the user maual... */ void splash(void) { cout << " ********************************************************\n"; cout << " * …

Member Avatar for Schol-R-LEA
0
131
Member Avatar for pendo826

Hey im writing a program and i have countless errors. Im following tuturiols and i have no clue what has happened. Thats the list. Im screwed. can anyone spot anything to get me kick started into a functional game. 1>c:\users\conor\documents\visual studio 2010\projects\ca2\ca2\weapon.h(21): error C2590: 'load' : only a constructor can …

Member Avatar for gusano79
1
765
Member Avatar for pendo826

In this .cpp i have an error saying member function cannot be redeclared. I dont know what it needs to get rid of the error obviously it needs a declaration somewhere but where? [CODE]#include <iostream> #include <ctime> using namespace std; Monster::Monster(std::string Name, int health, int hitPoints, int miss, int damage,const …

Member Avatar for Moschops
0
114
Member Avatar for chuyauchi

I have a difficulty for saving a file in C++. I have an existing file which is opened by my program. The program should save the changes to the existing file (Example: D:\A4.txt) when I select 4 (as known as the menu). However, the program does not save the changes. …

Member Avatar for thines01
0
215
Member Avatar for jeevsmyd

class vector { int *v; int size; vector ( int m ) { v=new int[size=m]; for(int i=0;i<size;i++) v[i]=0; } vector( int *a) { for(int i=0;i<size;i++) v[i]=a[i]; } }; int main() { int x[3]={1,2,3}; vector v1(3); vector v2(3); v1=x; v2=y; return 0; } My doubt is , how can the constructor …

Member Avatar for Ancient Dragon
0
115
Member Avatar for pendo826

Can anyone see the problem with my method ATTACK [CODE]#include "Monster.h" #include "Player.h" #include "Weapon.h" #include <iostream> using namespace std; Monster::Monster(std::string Name, int health, int hitPoints, int miss, int damage,const std::string& weaponName) { Name = Name; hitPoints = hitPoints; Weapon weapon; miss = miss; damage = damage; weapon.Name = weaponName; …

Member Avatar for pendo826
0
135
Member Avatar for XodoX

Ok, so I'm trying to fix this.. [CODE]# include <cstdlib> # include <iostream> # include <iomanip> # include <cmath> # include <omp.h> using namespace std; int main ( void ); void jacobi ( int n, double a[], double b[], double x[], double x_old[] ); void r8vec_uniform_01 ( int n, int …

Member Avatar for mrnutty
0
1K
Member Avatar for user543820

Hello! I want to split a string, say : "I have a dog" of string data type to an array of strings. I want to save that array. i.e I want an array like: array[0]="I" , array[1]="have" , array[2]= "a" , array[3]= "dog" Please help me out. Thanks,

Member Avatar for user543820
0
6K
Member Avatar for hardingC

#include <iostream> #include <windows.h> #include <cstdlib> #include <ctime> #include <cstdlib> #include <mmsystem.h> #include <vector> #include <conio.h> #include <functional> #include <stdio.h> using namespace std; char option; int answer; string theQues; string theAns; string ans; void Start(); void Level1(); void Level2(); //oid Level3(); int point=4; int main() { // system("color CE"); cout<<"\t** …

Member Avatar for hardingC
0
171
Member Avatar for luisborlido

I am doing an ATL Project in VC++ 2005 to use as ActiveX in VB6. I added methods, properties and events following the steps in this tutorial: [URL="http://www.codeproject.com/KB/atl/SimpleATLComWithDotNet.aspx"]http://www.codeproject.com/KB/atl/SimpleATLComWithDotNet.aspx[/URL]. Everything is working fine while I'm working inside the class. But now I need to call an event or method of the …

Member Avatar for luisborlido
0
315
Member Avatar for sheennave

Hello all, Visual Studio 2010 SP1 is running on a XP SP3 pc. Its C++/CLI IntelliSense support is enabled according to default configurations. However it also gives the message Intellisense unavailable. Do smb know how can this issue can be fixed ? Do i need to install an update, patch …

Member Avatar for cahitburak
0
108
Member Avatar for IT FRESH

hello guys ... i have a problem with my code here its basically to ask the user to input the time as HH:MM:SS then i calcluate the time as time=hh+mm/60+ss/3600 so first i used string so i will be able to store ':'.. now how to convert this string into …

Member Avatar for Narue
0
190
Member Avatar for nyuszi

Hi i need a little help. i want to read a multi array from a file but code blocks said a lots of error and i dont know whats the problem. can u help me? [ICODE]#include <iostream> #include <cstdlib> #include <math.h> #include <fstream> #include <sstream> using namespace std; int maxn=100; …

Member Avatar for nyuszi
0
257
Member Avatar for rhn94

I looked around quite a bit on how to solve this but i couldn't find a lot .. can anyone help me? The capitalized variables are constants [CODE] case '4': { bubbleSort(aList); string strKey; cout << " Input: "; cin >> strKey; binarySearch(aList, strKey); int binarySearchResult = binarySearch(aList, strKey); if …

Member Avatar for rhn94
0
248
Member Avatar for smallrubberfeet

Hello all, I'm having a bit of trouble logically figuring out what to do in this case for my cs150 class. I have to create a linked list from a while loop, but I can't figure out how to link the list successively at the end of each line so …

Member Avatar for Clinton Portis
0
2K
Member Avatar for minghags

Hello! I just made an program, but now i have problem with sorting output in the asc. order (int datum) thats date in our language :) [CODE] #include <iostream.h> #include <stdlib.h> struct datum { char dan [32]; char mesec [13]; char leto [5]; void vnosDatum(); void izpisDatum(); }; void datum::vnosDatum() …

0
115
Member Avatar for stereomatching

We already use a tool which called codeSynthesisXSD to transform xml into source codes of C++ Yet there are too many tedious routines could be automated. like [code] <xs:complexType name="common_t"> <xs:attribute name="channel_id" type="channel_id_st" use="optional" /> <xs:attribute name="audio_record" type="xs:string" use="required" /> <xs:attribute name="firmware" type="xs:string" use="optional" /> <xs:attribute name="login_id" type="xs:string" use="optional" /> …

0
68
Member Avatar for jefgreen

I have a couple of questions, regarding my program: ----------------------------------------------------------- #1: Is it possible to have my table centered? The table is located towards the bottom of my console output and, as you can see, the data is sort of off center. #2: Instead of having the user input five …

Member Avatar for vijayan121
0
155
Member Avatar for thenewbiecoder

[CODE]class Fraction { public: Fraction(); Fraction(int numerator, int denominator); void divide(int& num, int& denom) const; void multiply(int& num, int& denom) const; void add(int& num, int& denom) const; void substract(int& num, int& denom) const; int getNum() const; int getDenom() const; bool operator > (const Fraction& otherFraction) const; bool operator < (const …

Member Avatar for vijayan121
0
3K
Member Avatar for smallrubberfeet

Hello, I need to sort the following by ID as I enter them into a linked list by while loop. So far I can build through the list, but I'm not sure how to sort by ID as they are entered: Albert 1000 55.5 150 Babs 3000 60 110 Freida …

Member Avatar for mazzica1
0
129
Member Avatar for coroshea

This has really been frustrating me for hours. I have included useful comments in the program. All the descent examples i've come across were using char instead of string. :icon_cry: [CODE]#include <iostream> #include <string> using namespace std; class Celeb { private: string name; //Name of celebrity folowed by decade they …

Member Avatar for coroshea
0
279
Member Avatar for bawbawbiscuit

I searched all over the net trying to find the reason behind why numbers are illegal as first characters in naming identifiers in C++, they say its illegal but they don't say why its illegal Id be glad if someone could tell me why :) , just curious

Member Avatar for bawbawbiscuit
0
152
Member Avatar for dannyc116

I am trying to use C++ (in Visual Studio 2008) to create a program that I first made using Visual Logic. The program is supposed to check the users input with an external text file. The external text file just has the username's and passwords... https://sites.google.com/site/sharearea404/ I tried using arrays …

Member Avatar for Clinton Portis
0
7K

The End.