49,761 Topics

Member Avatar for
Member Avatar for XodoX

I'm talking about Flow of Control, Functions, Parameters, overloading, arrays, classes, Pointers and dynamic data structures,exception handling, operator overloading and perhaps including linked data structures. I am not liking the programming exercises the book has at the end of each chapter. But I will have to program something to really …

Member Avatar for raptr_dflo
0
151
Member Avatar for TheFearful

Hey guys, I am having trouble in writing this code. I don't know where to start other than the beginning basic things. I just need to know how to start this thing because I know it is a loop, but loops are my weakest things as of right now. Here …

Member Avatar for raptr_dflo
0
335
Member Avatar for james6754

Hi everyone, just learning c++ cannot for the life of me work out what is wrong with this code..? All I am getting is cout , undeclared identifier. Anyone help?

Member Avatar for WaltP
0
304
Member Avatar for Raim

So basically, I'm making a Windows Form Application CLR which calculates a worker's wage. Problem is, when I select the schedule (day,night,afternoon,mixed), I use a button for each schedule respectively, which, upon click, calculates everything on the data you've input. While this is effective, I am being asked to use …

Member Avatar for Ancient Dragon
0
389
Member Avatar for n0de

Hi, there is that thing that i need to handle atoi () function error.. Now for explanation atoi ( some const char * which is int (like '1') ) gives me that int, but if i write like this atoi ( 'n' ) then shit happens and it return's a …

Member Avatar for MeduZaPaT
0
713
Member Avatar for myrongainz

I can reverse it but can't figure out how to reverse it in pairs. example - hello output - ol le h [CODE]#include <iostream> #include <string> using namespace std; int main() { string user; cout<<"Enter a random text"<<endl; getline(cin,user); for(int i = user.length();i>=0;i--) { cout<<user[i]; } return 0; } [/CODE]

Member Avatar for mrnutty
0
174
Member Avatar for maria536

[CODE]#include <iostream> // required to perform C++ stream I/O #include <iomanip> // required for parameterized stream manipulators using namespace std; // for accessing C++ Standard Library members // function main begins program execution int main(){ double wage = 0, raise = 0, raiseMoney = 0; int years = 0; // …

Member Avatar for maria536
0
1K
Member Avatar for Interista

Hello, i need to create a binary tree menu such as, Sports Clothing Menu: 1 Soccer 2 Rugby 3 Swimming [I]4 Add a new category 5 Add a Selling item[/I] 6 Quit to main menu Could somebody please steer me in the right direction of how i can implement this …

Member Avatar for Interista
0
696
Member Avatar for scarlettmoon

Hi ~ Before posting my code, can someone tell me if it is possible to do a dual sort on an array of chars and an array of int, double or float? Would you have to use two separate sorts? Really confused here. I am trying to sort an array …

Member Avatar for phfilly
0
525
Member Avatar for jpd5066

Here is my code for the same exact program. I have everything working except for displaying the calculated monthly interest. I could use some help. #include <iostream> #include <iomanip> using namespace std; int main() { double mortgage, interest, payment, years, monthlyInterest, monthlyBalance, numPayments; int counter; cout << "Please enter a …

Member Avatar for jpd5066
0
100
Member Avatar for Nimerion

Hello there. I'm trying to make a program which can input elements (integers) and sort them, then input them in a txt file. I've made the functions (write on file, read from file, sorting elements), but now I need the following.. When I use a file on which I have …

Member Avatar for jtbens01
0
164
Member Avatar for lelejau

Just after I include D3DX9.H I get tons of errors... like these: [CODE] Error 12 error C2039: 'm' : is not a member of 'D3DXMATRIX' c:\program files\microsoft directx 9.0 sdk (summer 2004)\include\d3dx9math.inl 1987 1 Aura2 Error 13 error C2039: 'm' : is not a member of 'D3DXMATRIX' c:\program files\microsoft directx …

Member Avatar for lelejau
0
951
Member Avatar for Labdabeta
Member Avatar for JamesCherrill
0
338
Member Avatar for BoBok2002

Hi,I spent all night trying to figure this out. Could someone take a look and show me what I'm missing? I getting this compiler error: [B]unterminated #ifndef [/B]. But I have [B]ifndef[/B] at the beginning and [B]endif[/B] at the end of the class. [CODE]//Header file. //Class definition for teh stack …

Member Avatar for BoBok2002
0
42K
Member Avatar for beaute

I am still trying to resolve the problem I described in [URL="http://www.daniweb.com/software-development/cpp/threads/388174"]this thread[/URL] where I basically have a DLL written in native C and want to develop a wrapper function for it and call the C functions from within a C++ application. The solution described in that thread works, but …

Member Avatar for beaute
0
475
Member Avatar for neuro

Hello all, I'll hopefully be attending a cognitive neuroscience PhD program next fall and I'd like to learn some programming beforehand (having programming skills helps for lots of neuroimaging labs). Labs I've worked in used UNIX, MATLAB, and E-Prime (visual basic) and I'd really like to improve my knowledge before …

Member Avatar for verona.jenn
0
235
Member Avatar for SkpLeaD

Hello guys I had an Exercise for a Noughts and Crosses game and i thought maybe it could help whoever needs to get an idea of Classes and Arrays. [CODE]#include <iostream> using namespace std; class CNoughts { private: int grid[3][3]; public: void Initialise(); void Grid(); void PlayerInput(); int Player,i,j; int …

0
162
Member Avatar for spicyrelish

I have to follow the Command Pattern in making a reverse polish notation calculator in C++. It needs to do undo and redo. It's due tomorrow morning so I've been banging my head against the table everyday for the last two weeks even tho I know its probably very easy …

Member Avatar for WaltP
0
133
Member Avatar for infantheartlyje

Hi..this is my coding. Its compiled successfully. But i could not get my result. I don't know whether the data stored in the file successfully or not. Please Help me. [CODE] #include <iostream> #include <fstream> #include <cstring> using namespace std; struct status { char name[80]; double balance; unsigned long account_num; …

0
97
Member Avatar for jigglymig

I am having trouble with the program not pushing the strings and only part of the characters from the file. I really hope one of you can help me because this is due in the morning here is the actual assignment Learning Objectives: The purpose of this lab is to …

0
65
Member Avatar for aramil daern

Hi fellow programmers. I am having a cross os compiling problem. I want my friend to test a program I am makimg, and he knows nothing about c++. I am using linux ubuntu 11.04 and can compile on that, but I can't find how to compile for windows, and he …

Member Avatar for aramil daern
0
72
Member Avatar for myrongainz

I know this program only takes few lines. I don't now how to out put the text to print every other letter for example: shsofwbanrqeiyzobu output: h o w a r e y o u [CODE]int main() {string k; cout << "eneter a text" << endl; getline(cin,k); for(int index =1; …

Member Avatar for myrongainz
0
618
Member Avatar for pendo826

can anyone see why the status.health wont take away the 20 ???? [CODE]#include <iostream> #include <string> // To allow use of Strings. using namespace std; //char inventoryRequest = 'i'; //Function Definitions. void displayInventory(); void displayStats(); void statsObject(); void gameOver(); void stats(); void inventory(); void exitGame(); int playGame(); class status{ public://Access …

Member Avatar for pendo826
0
194
Member Avatar for ben1996123

I just decided that I wanted to make one with C++, but I'm not really sure what I should put in it. Any ideas? I don't just want it to be some boring thing where you have to "Press enter to continue" all the time.

Member Avatar for Cireyoretihw
0
262
Member Avatar for minghags

Hello. I have to do an program that writes an scale from num 1 to num 2. I managed to do that writes out from 1 to given number. Can anyone help me do that I can insert an scale starting number? Code: [CODE]#include <iostream> using namespace std; void prime_num(int); …

Member Avatar for minghags
0
255
Member Avatar for sha11e

I need a program that presses down the space bar, I found this for SHIFT [CODE] #include <iostream> #include<windows.h> #include<fstream> #include<iomanip> #include<time.h> using namespace std; int main() { keybd_event(VK_SHIFT,0x10,0,0); //shift press cin.get(); keybd_event(VK_SHIFT,0x10,KEYEVENTF_KEYUP,0);// shift release return 0; } [/CODE] But I can't seem to find the VK_? and 0x?? codes …

Member Avatar for sha11e
0
210
Member Avatar for s_r_k

I'm doing a project for school and I'm having difficulty getting the average of two averages, using arrays. I have to get the average of high temperatures for a year, the average for low temperatures for a year, and then find the average of those average. We used 366 days …

Member Avatar for s_r_k
0
153
Member Avatar for pendo826

Hi[QUOTE]just wondering how i would set up a menu so that i can call anytime when pressing "M". im nearly sure it would have to be a loop but im not quite sure how to do it. can anybody help? thanks [/QUOTE]

Member Avatar for pendo826
0
147
Member Avatar for ayeshashahid

i have a serious problem with this malloc function used in C language.i have been studying the topic "new" for few days,and there i found a code in which malloc was used.i am trying to change it to new but my compiler always always CRASHES. the line which i think …

Member Avatar for ayeshashahid
0
163
Member Avatar for AmerJamil

i'm beginner in C++, please help me in display function to display the linked list of my following program thanks [CODE] #include <iostream> using namespace std; template< class T > class Lnode { public: T data; Lnode< T > *next; }; template< class T > class List { public: int …

Member Avatar for mazzica1
0
152

The End.