49,761 Topics

Member Avatar for
Member Avatar for Chris-16

I am trying to set up a 12 month table summary in a bank account program. The problem I have is I am trying to figure out how to set it up correctly. Here is my class and application from the bank account: Here's the class part: [CODE]class SavingsAccount { …

Member Avatar for andigirlsc
0
347
Member Avatar for SANTHOSHEINSTEIN
Member Avatar for vmanes
0
57
Member Avatar for A Haunted Army

i've been working on a game project, its a slider platformer and i've been having problem with getting the movement working, the movement is time based instead of being fixed to the frames per secound so the movement is consistent. the movement was working when i was testing out the …

Member Avatar for A Haunted Army
0
1K
Member Avatar for AndyPants

I just built a new computer and I am trying to keep it as "clean" as possible. I have the purchaised version of VisualStudio 2008 but I dont know wether I should install that, or the latest express version?

Member Avatar for Ancient Dragon
0
111
Member Avatar for OsamaJutt

hello. i doing my work and facing problem in "<<" operator i declare that method in the class public: friend ostream& operator<<(ostream& out, T theList); and in the main i am using that to print the list in this way cout<<"First List is \n"<<list1; but it creat error in the …

Member Avatar for OsamaJutt
0
133
Member Avatar for trantran

I am trying to have a C++11 compiler that works. It seems (if the publicity is right... and typically it never usually is!) that gnu g++ 4.8 might be it. So I installed Ubuntu 12.04 read the instruction on multiple sites, did EXACTLY as it was said, got (obviously) errors, …

Member Avatar for trantran
0
434
Member Avatar for tanmay.majumdar2

#include<iostream> #include<conio.h> using namespace std; char square[10] = {'o','1','2','3','4','5','6','7','8','9'}; void box(); int checkwin(); int main() { char f, g, e[10]={'o','1','2','3','4','5','6','7','8','9'}; int a; int c, d; for(a=1;(a<=9);a++) { int b; system("CLS"); box(); if(a%2==1) { cout<<"player 1 enter your num\n"; cin>>b; } else { cout<<"player 2 enter you number\n"; cin>>c; } if(b==1&&square[1]=='1') …

Member Avatar for CGSMCMLXXV
0
166
Member Avatar for GeneClaude

In this code, I need to put a limitation in every part where the user is asked to input data. The user will be asked to input a grade ranging from 50-100, and if his input is not in the range, the program will display a warning, and if the …

Member Avatar for CGSMCMLXXV
0
243
Member Avatar for jim.hurley

I try to reference a struct from another class in my code and it gives me an error, saying I have a syntax problem. //Figure index struct FIGURE_TYPE { //Where to crop the image from SDL_Rect crop; int x; int y; }; That's the struct in Figure.h, void set_camera ( …

Member Avatar for jim.hurley
0
608
Member Avatar for deceptikon

Another quickie. This is a basic class for working with Windows path strings. It's based off of .NET's System.IO.Path class, but doesn't contain any API dependencies (and thus doesn't normalize the paths, it's all straight string handling). Methods that I've personally found to be useful are included. The class is …

Member Avatar for deceptikon
0
394
Member Avatar for sarah.mathieson.7

I am new to c++ and to using graphics libraries, so please forgive me if I have made a silly mistake. I am trying to compile a program that creates a window with one button from an example I found online. This is the error I get when I try …

Member Avatar for sarah.mathieson.7
0
715
Member Avatar for dreday92

Can someone tell me why I get this error "terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check Abort trap" when i run the following code? user and reservations are vectors of two classes else if (str == "lookup") { getline(cin, Name, '\n'); if (Name == user.at(i).getName()) { for …

Member Avatar for deceptikon
0
736
Member Avatar for Beteabmlemma

Pleace help me with this!!!how can we change a decimal number into binary,octal and hexadecimal using c++????

Member Avatar for programmer007
0
367
Member Avatar for Kareem Klas

Hello members, I have started studying C++ with the book "C++ primer"( by Stanley B. Lippman, Josée Lajoie& Barbara E. Moo). I use Visual Studio 2012 Ultimate and make my projects on Win32ConsoloApllication. There was an example and I wanted to make it over for myself. #include <iostream> int main() …

Member Avatar for Kareem Klas
0
175
Member Avatar for P3C1

#include <iostream> using namespace std; int main() { int rows = 3, columns = 3; int ****p; p = new int***(); *p = new int**(); **p = new int*[rows]; for(int i = 0; i < rows; i++) { ***(p+i) = new int [columns]; //Crashed at ***(p+1) why? } } I'm …

Member Avatar for P3C1
1
138
Member Avatar for letterG

Hi all! I've just started working on my Binary Search Tree and already there's a problem that I can't seem to understand. Ok here's the problem, when I compile its ok but when I run it there's an error, i've managed to found where the problem is but I don't …

Member Avatar for letterG
0
159
Member Avatar for lewashby

Does anyone know how I can add "0" to the left side of a string? If I get "1234" I'd like to make it "012345", if I get "1234" I'd like to make it "001234". Any suggestions?

Member Avatar for Moschops
0
152
Member Avatar for abbashadwan

#include<iostream.h> #include<conio.h> #define size 5 int stack[size],top=-1; void push(int s[size],int &t,int m); int pop (int s[size],int &t); void main() { clrscr(); cout<<"1-push \n 2-pop \n 3-exit \n"; int x,y; do { cout<<"enter number to choice:"; cin>>x; switch(x) { case 1: cout << "enter anumber to push in stack \n"; cin …

Member Avatar for Ancient Dragon
0
227
Member Avatar for nitin1

i am learning C++ from a good time now.. but I am still very confused sometimes in the use of array(char) and string.. can anyone please tell me that what exactly all differences between string and char array ? what can i do with array which i can't do with …

Member Avatar for Lucaci Andrew
0
206
Member Avatar for Petcheco

Hello everyone. I saw a post of one of our friends here about a problem he found of the SPOJ website. So I went there to check it. I found it to be very cool; I started to do the exercises but when I got in the 2nd, a prime …

Member Avatar for Petcheco
0
204
Member Avatar for pinkesh25gar

#include<iostream> #include<vector> #include<stdio.h> #include<string.h> #include<stdlib.h> #include<algorithm> #define READY 1 using namespace std; typedef struct task_node { int task_id; int period; int wcet; int arrival_time; int deadline; int state; int ceu; int slacktime; }task; void read_input(vector<task> &); void print_task_vec(vector<task> &); bool comparebyperiod(const task&,const task&); bool comparebydeadline(const task&,const task&); bool comparebyslacktime(const task&,const …

Member Avatar for Ancient Dragon
0
257
Member Avatar for shaguftakhan

Problem Statement: You are required to write a program for calculating area of Trapezoid. Formula for calculating area of trapezoid is Where a and b are two bases of trapezoid and h corresponds to height.

Member Avatar for NathanOliver
-1
118
Member Avatar for ramy.merc

Hi programmers, I am a c# programmer but I have a very big project in C++ (Which I am not familiar with) and I am facing a big problem. As part of the project, I need to convert the image (any image of any type bmp,jpeg,png...etc) to grayscale using openMP. …

Member Avatar for Moschops
0
2K
Member Avatar for daniel1977

Dear Friends: I m hung up in Mod3 Ch5 Exercise 1. On line 149 (visible on my wiki below), the Xcode compiler throws an error saying that I'm not passing a valid parameter. http://www.jeffgeiger.com/wiki/index.php/School/CS270Mod3Ch5ProgEx1 As I understand it, remove(elem) takes an element and deletes any matching elements in the list …

Member Avatar for NathanOliver
0
142
Member Avatar for lewashby

In the following test case program I'M trying to figure out how I can use the remainder of divison to make a decision but I can not seem to get this test case to respond in the way that I think and want it to respond based upon the remainder …

Member Avatar for deceptikon
0
106
Member Avatar for trantran

I want to create an arrays pointing to the members of an object, something like this: // der1, der2, der3 or derived object of base class myobject{ der1 * d1; der2 * d2 der3 * d3 void do_op(){ *d3=*d1 + *d2;} // this must remain as time-efficient as possible typedef …

Member Avatar for kresimir
0
108
Member Avatar for ztdep

Dear friends: I am trying to convert a double to string format using the std::to_string function, but it gives me the following error message. i do not understand why the functgion does not support the double format. i use the vs2010. > error C2668: 'std::to_string' : ambiguous call to overloaded …

Member Avatar for tinstaafl
0
963
Member Avatar for on93

Can anyone tell me about this program how the delete tail work ? ..................................................................... void linklist::deleteSearchList(int id) { node * cur; cur = head; if (cur == NULL) return; // no node in list if (cur->link == NULL){ delete cur; head = NULL; }else if (id == head ->st.id){ cur …

Member Avatar for Lucaci Andrew
0
105
Member Avatar for kartouss

Hello, I need to encrypt an image but my program is accepting 16 bytes of data for encryption from a file named plaintext.txt.. The program is encrypting data in blocks of 16 bytes that is the 1st 16 bytes are read then it is encrypted and saved in the ciphertext.txt …

Member Avatar for gnrsu
0
1K
Member Avatar for ziadkassam
Member Avatar for ziadkassam
0
716

The End.