49,761 Topics
| |
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 … | |
| 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 … |
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? | |
| 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 … |
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 … | |
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] | |
[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; // … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Is it possible to create an array of functions in Java? Or is this not possible? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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; … | |
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 … | |
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. | |
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); … | |
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 … | |
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 … | |
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] | |
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 … | |
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 … |
The End.