49,761 Topics

Member Avatar for
Member Avatar for newtechie

I have to write a textual scenario for a gamming code . Should i write about the game or should i be writing about the code?

Member Avatar for newtechie
0
121
Member Avatar for sravanitalari

write a program which takes student marks from user and it pass to student class object then that class decides whether the student getting first , second or third classes

Member Avatar for mrnutty
0
70
Member Avatar for mcco1

I have the next piece of code: [CODE=C++] vector<ChatSession> ssid; void SessionCreator( void *ch ) { vector<string> users; ... ... ... ChatSession cs; // put chat session objects in vector array for (int i = 0; i < (int)users.size(); i++) { const char *t = users[i].data(); char t2[30]; memcpy(t2, t, …

Member Avatar for Ancient Dragon
0
114
Member Avatar for boyjim32

Problem 2: Write a program which will accept the price and description of three items. It will then display the total price of the three items as its output. Here is a sample output: First Item: ruler Enter price: P 32.50 Second item: notebook Enter price: P 25.00 Third item: …

Member Avatar for tux4life
-1
247
Member Avatar for metalclunch

Hello, this is Metalcrunch. I've been learning C++ over the past days and I thought I'd make a calculator. So I looked over the existing code on the internet on how to make a calculator, understood it, then made my own from the very scratch. However, I'm having a few …

Member Avatar for 23.12.2012
0
237
Member Avatar for muhandis

I am starting some threads using AfxBeginThread and they work by monitoring a flag (sent via lParam) and once they find the flag is set, they return. However, once they do return, they aren't deleted and I get a memory leak. Shouldn't this method work fine and not cause any …

Member Avatar for Salem
0
566
Member Avatar for walter clark

Why did Microsoft Visual C++ developers choose "Form1.h" for us to put all of our source code in, instead of a Form1.cpp? I find the Form1.h file to grow without bound; thousands of lines... in an "h" file! Walt

Member Avatar for Ancient Dragon
0
97
Member Avatar for risa

Hi, How to set background image of CTreeCtrl? And also how can i set different colours to different items of CtreeCtrl?

Member Avatar for hawash
0
219
Member Avatar for shizu

Hi all.. I would like to convert a hex to CString format.. I had try like below I shown, but failed to convert into CString format that I wish to.. Here is the example I tried.. CString sz; unsigned short test = 0xB0FF0000; sz.Format("%X", test); then I got sz = …

Member Avatar for hawash
0
1K
Member Avatar for new_divine

whenever i compile in code-blocks for wxwidgets following error is generated but when i priview the wxform it shows the form . i really don't know what is this. ||=== banking, Debug ===| WxWidgets.org\wxMSW-2.8.10\wxMSW-2.8.10\include\wx\platform.h|196|wx/setup.h: No such file or directory| WxWidgets.org\wxMSW-2.8.10\wxMSW-2.8.10\include\wx\chkconf.h|103|#error "wxUSE_DYNLIB_CLASS must be defined."| WxWidgets.org\wxMSW-2.8.10\wxMSW-2.8.10\include\wx\chkconf.h|111|#error "wxUSE_EXCEPTIONS must be defined."| WxWidgets.org\wxMSW-2.8.10\wxMSW-2.8.10\include\wx\chkconf.h|119|#error …

Member Avatar for bnekolny
0
142
Member Avatar for ttqtrang146

These are my examples: [code] /*int WriteFile(const char* file_name) { fstream file; try { file.open(file_name,ios.out); file << "67"; //file << "I miss you very much."; file.close(); } catch(exception& e) { cout << e.what(); return 1; } return 0; }*/ /*int ReadFile(const char* file_name) { fstream file; file.open(file_name,ios.in); if(file.is_open()) { string …

Member Avatar for Nick Evan
0
110
Member Avatar for rciprogrammer

Hi I am 'trying' to get my head around multi-threaded programs. I have a working program (single thread) that uses a socket to listen on a particular port and exchange info with a client(s). The basic program structure is this (most declarations and error-checking removed for clarity): [code=c++] ... /* …

Member Avatar for rciprogrammer
0
243
Member Avatar for nielsp

Why does'nt the following code work? [code="cplusplus"] #include <iostream> class X { public: X() : m(0) { } virtual ~X() { } protected: int m; }; class Y : public X { private: class Z { void do_something() { std::cout << m << std::endl; } }; }; [/CODE] I get …

Member Avatar for nielsp
0
3K
Member Avatar for abby2589

hi! can someone give me some idea what kind of game is easy to do in c++? or kind of a system.. it is for our project..I'm thinking of doing text twist..can someone give some other idea? thanks very much!!!

Member Avatar for jencas
0
75
Member Avatar for xiikryssiix

okay, i usually create beg programs and they often compile. for some reason, this one is not compiling at all. i cant seem to figure out whats wrong. my objective is to prompt user to open a file named "data.txt" have HELLO WORLD printed in a scrambled version to a …

Member Avatar for iamthwee
0
202
Member Avatar for VIkhers

dear sir... i got a confusing of this... [code]ifstream is; Char c, temp_isi_file[100]; int i; is.open ("b.a"); memset(temp_isi_file,'\0',100); while (is.good()) // loop while extraction from file is possible { c = is.get(); if (is.good()) if (c==',') { //cout << temp_isi_file << ":" ; [COLOR="Red"]textBox1->Text = Convert::ToString(temp_isi_file);[/COLOR] i=0; c='\0'; memset(temp_isi_file,'\0',100); } …

Member Avatar for VIkhers
0
207
Member Avatar for kokotsu

Hello, I was trying to create a Coalesced hash table by self teaching myself using various sources. I fixed most of the errors, but when i compile on either my visual C++ compiler or Dev -C++ both saids there is a undefine linker reference for the hash members in my …

Member Avatar for kvprajapati
0
107
Member Avatar for xiikryssiix

i am in beg c++ and my instructor is asking me to find "some other combination that also does not work! Your loop should prove something similar for values other than 10 cycles, steps of 0.1, and a sum of 1." i found 1 combination, which is in my program …

Member Avatar for xiikryssiix
1
108
Member Avatar for lotrsimp12345
Member Avatar for tazboy

Here is my function that reads in a list of integers and doubles the size of the array if there are too many inputs. The current size of the array is 10. [CODE=C++] int* read_list ( int *list, size_t *list_size_ptr, size_t *array_size ){ size_t index = 0; int *new_list; while …

Member Avatar for VernonDozier
0
97
Member Avatar for Nathan Campos

Hello, I'm new here in DaniWeb, and this is my first post, but i'm learning [I]C++[/I] and before this i was reading some tutorials in the internet of the [URL="http://www.adobe.com/br/products/air/"][I]Adobe AIR[/I][/URL] development, but if Adobe AIR is so much easy to learn and [I]C++[/I] is a very flexible and good …

0
67
Member Avatar for CppBuilder2006

console.cpp: [CODE="c++"] #include <iostream> #include <string> #include <vector> using namespace std; template <typename T> T #ifndef _DEBUG & #endif val(const T& x); class A { private: public: void f(); }; void A::f() { val(1);// deleting val solves the problem } int main() { new A; cin.get(); } [/CODE] general.cpp: [CODE="c++"] …

Member Avatar for Dave Sinkula
0
103
Member Avatar for monkey56657

Hello. I am quite new to c++ but am working on translating a prime generator I have made over from c#. I have everything working well but have found that c# can output to file faster than c++ (by around 10%). This is once the 'working out' is done. Here …

Member Avatar for monkey56657
0
273
Member Avatar for walter clark

I've been programming in C++ for 20 years and finally got the size of my mains down. I've been programming in C++/CLI for about 20 days, and I'm back to my old buggy-boo, uncontrolled file size. In this case it is the Form1.h file. It has about 20 controls using …

0
51
Member Avatar for seakayaker

Hi, I have developed a lot console applications in C++ using Visual Studio Express and I am curious how much effort it would be to wrap them with a ultra simple GUI? Do I have to purchase MFC or code hunded of pages in order to accomplish this in C++ …

Member Avatar for Stefano Mtangoo
0
148
Member Avatar for Cromarte888

Alright, I'm down to the nitty gritty absolute end of a fully functional hangman game. There is just one part where I am absolutely stuck. When you get a wrong guess, the game successfully draws the gallows. I have no issues with wrong guesses. It's the right guesses that has …

Member Avatar for Cromarte888
0
228
Member Avatar for Denxerator

Okay so, It's my first time on C++. They say you can use C++ to make games, so I want to learn about C++. (remember I'm a big newbie) So my question is, how does C++ work? Like if you put the C++ code in notepad, save it, open it, …

Member Avatar for tux4life
0
179
Member Avatar for born_to_code

i have to make a program to find the intersection of two strings, i have made program but its not working. any help will be appreciated.:) [code] #include <cstdlib> #include <iostream> using namespace std; void intersection(char *str1, char *str2) { int len1,len2,i=0,j,flag=0; char temp[30]; while(*str1!='\0') //outer loop for 1st string. …

Member Avatar for Tom Gunn
0
1K
Member Avatar for lotrsimp12345

ITS ALL THE WAY AT THE BOTTOM OF MY IMPLEMENTATION FILE. MAIN [code] #include <iostream> #include <fstream> #include "line_test.h" using namespace std; int main() { //open up file to be read string input; ifstream in; cout<<"enter file name which needs to be opened\n"; cin>>input; in.open(input.c_str()); while(!in) { in.close(); cout<<"the input …

Member Avatar for Dave Sinkula
0
105
Member Avatar for CppBuilder2006

please download the VC++ express 2008 project attached. it has linker errors. please help me solve the problem.

Member Avatar for CppBuilder2006
0
61

The End.