49,761 Topics

Member Avatar for
Member Avatar for tennis

[CODE]Class date{ protected: int year_; int month_; int day_; public: date(); date(const int& d, const int& m, const int& y); date operator++(); //prefix operator date operator++(int); //postfix operator date operator--(); //prefix operator date operator--(int); //postfix operator }; date date::operator++(int){ //postfix operator return current value date d=*this; *this=next_date(d); return d; } …

Member Avatar for webweb2
0
76
Member Avatar for Bigbrain99

How to label the first input of user as 1 ,second input 2, third input 3..etc by using ofstream append? Everytime when I used terminal to run it e.g. ./addcontact.cpp name1 ./addcontact.cpp name2 so that inside dat file it will has number of sequence in front of new name? e.g. …

Member Avatar for Bigbrain99
0
108
Member Avatar for watery87

hi guys, am currently coding a multi threaded program to solve a maze. But firstly im having trouble saving the maze into 2d array. Any help is much appreciated [CODE] #include <stdlib.h> #include <iostream> #include <stdio.h> #include <fstream> using namespace std; void getMaze() { fstream readMaze("mazedata.txt"); string templine, line; while(getline(readMaze, …

0
73
Member Avatar for techick

Hi...next semester I will be taking advanced programming in C++. I would like to know any good up-to-date books that I can buy and read ahead to get a head start so I can be prepared for the class

Member Avatar for khusro.iqbal
0
110
Member Avatar for Neha Nandra1

[COLOR="Red"][I][B][/B][/I][/COLOR]Hey can u help me to make a program of calendar,,,

Member Avatar for Kieran Y5
-2
72
Member Avatar for daggerdvm

can you help me fix this code to make it better and more acceptable as per coding standards and such. im trying to get a good grasp of classes in c++ [code=c++] #include <iostream> using namespace std; class Calculator { private: int number1; int number2 ; public: Calculator setCalcNumbers(int input1 …

Member Avatar for embooglement
0
149
Member Avatar for stevee1984

A win32 listview with the view style set to LV_VIEW_DETAILS will not draw onto a window with its exstyle WS_EX_COMPOSITED set? Why? Heres my code for changing my dialogbox to composite if anyone is interested: [CODE] case WM_INITDIALOG: { unsigned long styles = GetWindowLong(hwndDlg, GWL_EXSTYLE); SetWindowLong(hwndDlg, GWL_EXSTYLE, styles | WS_EX_COMPOSITED); …

Member Avatar for stevee1984
0
306
Member Avatar for darkmeyi0319

hey guys i just want to ask for your help about the source code of ROCK PAPER SCISSORS game on c++, the rules of the game is that, the user and the computer will battle, the game consist of 5 rounds ONLY,and first player who score 3 out of 5 …

Member Avatar for dflatt
-2
159
Member Avatar for michdd

I'm getting this error: [CODE]error: no matching function for call to 'cp::cpImageButton::SetMouseClickCallback(TitleScreen* const, void (TitleScreen::*)())'| note: candidates are: void cp::cpImageButton::SetMouseClickCallback(DisplayObjectContainer*, void (DisplayObjectContainer::*)())|[/CODE] However, TitleScreen inherits from DisplayObjectContainer, so I'm unsure why this isn't working. I haven't really worked with inheritance in C++ much, so a push in the right direction …

Member Avatar for mike_2000_17
0
148
Member Avatar for ftl25

Hi. I am currently building a small DLL (~20 functions so far) project to sit between a larger DLL and a VB project. I am now at a stage where I want some advice before proceeding (I can fairly easily make changes at this stage, but if I continue it …

Member Avatar for mike_2000_17
0
116
Member Avatar for samsons17

Hi guys.... It has been a long time since i left this forum.. Now i'm actually back studying c++ and here is the little problems that i got with the 2D array question. I need to create this pattern using the 2D array: 1 0 1 0 1 1 0 …

Member Avatar for Fbody
0
129
Member Avatar for daviddoria

I am trying to remove the need to #include stl elements in my header (a requirement for a project I work on). I wrote a "wrapper" for std::vector called "MyVector". I declare a pointer to a MyVector as a member of MyClass. Then when I try to use this in …

Member Avatar for daviddoria
0
260
Member Avatar for dflatt

i'm trying to use string stream to get data from an input file. the program works until it get's to adding the elements to the array. i'm still not completely sure how to make use of stringstream yet or if i'm using it right. [CODE] ifstream ipf; ipf.open(test.txt); char c; …

Member Avatar for dflatt
0
142
Member Avatar for andrewjrmill

Hi everyone i need some help im trying to compile a visual c++ program but theres a make file how do i us this to compile my program to exe im using windows xp thanks for your help

Member Avatar for helioptra
0
117
Member Avatar for indigo.8

Hey, I have an array of ints that are read from a file then stored in an unsigned char array. The array is declared in a static link. The pointer is then passed to main. Main then calls a DLL which will process the information that is stored in the …

Member Avatar for indigo.8
0
5K
Member Avatar for Auraomega

Finished writing this a little while ago but unfortunately the generated MD5 doesn't match other application's hashes. I have basically used [URL="http://en.wikipedia.org/wiki/Md5"]Wikipedia[/URL] for reference. I have a feeling my error is introduced in the padding stage but I can't be certain, hoping a fresh set of eyes could point out …

Member Avatar for Kieran Y5
0
251
Member Avatar for y2kshane

Hi, I'm working through a tutorial and I've gotten to this part, creating a basic window: Code: hwnd = CreateWindowEx( WS_EX_CLIENTEDGE, g_szClassName, "The title of my window", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 240, 120, NULL, NULL, hInstance, NULL); A explaination is now given which I don't really understand: " The first parameter …

0
59
Member Avatar for fire_

Hello. I have some problems. 1.With for cycle. This is my code: [CODE]#include <iostream> #include <fstream> int main () { int i; int i2; char sentence [200]; char repeat; ofstream file ("file.txt", ios::app); for (i=0; i<1;) { cout << "Enter sentence (max. 200 symbols)\n"; cin >> sentence; if (!file) { …

Member Avatar for Kanoisa
0
164
Member Avatar for Rocky111

Hi, I currenty working on some assignment. This requires a server to process some entities for specific time. after that time server not process any entities further. I don't get to how to start implemet this. Plz help Thanks in advance.

0
44
Member Avatar for dansnyderECE

0 down vote favorite I'm trying to figure out how exactly to use stat() to capture information about a file. What I need is to be able to print several fields of information about a file. So.. [CODE] #include <iostream> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> using namespace std; int …

Member Avatar for dansnyderECE
0
484
Member Avatar for HumanBeing86

Anyone know where is my M+U result go?? [CODE]#include <iostream> using namespace std; template<class P> P add(P a, P b){ P result; result = a + b; return result; } int main() { int a1 = 5, a2 = 3; double b1 = 1.2, b2 = 2.3; char c1 = …

Member Avatar for Fbody
0
197
Member Avatar for Duki

Hey guys, I'm getting this error: [quote]1>GoblinRecruit.obj : error LNK2019: unresolved external symbol "public: void __thiscall Mob::set_data(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,int,int,int,int,int,int,int,int,int)" (?set_data@Mob@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HHHHHHHHH@Z) referenced in function "public: __thiscall GoblinRecruit::GoblinRecruit(void)" (??0GoblinRecruit@@QAE@XZ) [/quote] When I try to run this section of code: [code=c++] #include "Standard Libs.h" #include "Ability.h" class Mob { private: string …

Member Avatar for Duki
0
97
Member Avatar for PixelExchange

Does anyone know how to "disable" the windows taskbar.. or at least "hide" it, using Win32? I've seen it done in another program.. but I was clueless as to how the person did it. I would like to be able to display one of my programs on the entire screen, …

Member Avatar for PixelExchange
0
438
Member Avatar for sana_moi

hellow need your help there is my code i try to get the text from combobox & put it in request but when i wont to ut the result of the request in other texbox i figure out that the value is empty : [code]HSTMT hStmt; char* nbnk; int ret1; …

Member Avatar for sana_moi
0
98
Member Avatar for 333kyle333

Okay, this is probably gonna sound dumb, but I need to know if it's possible to take a variable held using C++ and make it an environment variable in a Linux terminal. If it makes a difference, I'm using Ubuntu Linux with the Gnome shell.

Member Avatar for 333kyle333
0
303
Member Avatar for ^Y^ nobody ^Y^

Hi, i'm making a program that outputs a lot of questions at 1 time. .... ?? .... ?? .... ?? and i want write the answers in front of the questions and input it in the same order... that would be like How are you? and i write the answer …

Member Avatar for Kanoisa
0
160
Member Avatar for vidyaj

hi all, i need a c++ code to display a non binary tree. it should be used with STL multimap.. please help me to find the same..

0
21
Member Avatar for PixelExchange

Hi everyone.. I've recently switched over from Visual Studio 6.0 to visual Studio 2010.. The problem is studio 2010 does not have an "execute .exe button," as version 6 does. Is there a way to manually place an execute .exe button inside of visual 2010?

Member Avatar for PixelExchange
0
108
Member Avatar for kemooo

Design and write a program to calculate the third angle and the other two sides of a triangle. The input to the program is the length of one side a (unit not important) the sizes of the two angles adjacent to that side B, C degrees An important point that …

Member Avatar for mrnutty
0
119
Member Avatar for Bigbrain99

[CODE]void addname(string name) { ofstream myfile(CONTACTS,ios::app ); myfile.open(CONTACTS); if (myfile.is_open()); { myfile<<i++<<name<<endl; myfile.close(); } }[/CODE] Initially the codes just kept on overwriting the existing file, but after that i was told to put ios::app. However, it is still now working....now even worse...ofstream is not even writing the file...hellp..

Member Avatar for Bigbrain99
0
114

The End.