49,761 Topics

Member Avatar for
Member Avatar for sing1006

can anyone explain to me what is the definition for the both above.i had search on the internet but still cant got wat it is mean by.if can pls show some example to me.thanks

Member Avatar for sing1006
-1
111
Member Avatar for Japracool

Here's my code: [CODE]#include <iostream> #include <iomanip> #include <string> #include <vector> #include <fstream> #include <stdlib.h> using namespace std; class employee { /* Employee class to contain employee data */ private: string surname; double hourlyRate; int empNumber; public: employee() { hourlyRate = -1; empNumber = -1; surname = ""; } employee(const …

Member Avatar for Japracool
0
281
Member Avatar for sdr001

Does anyone know why I am getting an error on this line of code below? Thanks for you help in advance. [CODE] vector < vector < htNode<B> > > table; [/CODE]

Member Avatar for sdr001
0
187
Member Avatar for skips

I believe this to be a simple problem. My program runs fine, but I cannot figure why the variable "final_grades" is not being passed to the function and output. alternatively, I may be calling to the function incorrectly. This is the first class that I have written, so it may …

Member Avatar for skips
0
169
Member Avatar for pseudorandom21

I have a C++/CLI form, and a native class in separate files. I include the header file of the native class at the top of the Form.h This causes the compiler to try to compile the constructor of the Form as a native function and spits out 100+ errors and …

Member Avatar for jonsca
0
122
Member Avatar for atticusr5

Hello all, I am trying to debug some code that I have come across. It is an array based BST, and I can not figure out why the parent's are not being recorded correctly. Essentially the first few inserts work, and then the parents become incorrect. Can anyone give me …

Member Avatar for mike_2000_17
0
146
Member Avatar for toferdagofer

i am writing a decryption program that reads a file from another project solution and decrypts it then writes it to a new file in its own project folder. For some reason when i try and read the file in the program says that file doesn't exist. Im pretty sure …

Member Avatar for Moschops
0
152
Member Avatar for irinaki

I'm very very new to c++.I'm truing to built a program to make new appointment etc. [CODE]#include <iostream> #include <vector> #include <string> using namespace std; class Appointment; class MyDate { private: string date; string hour; public: MyDate();//constructor xoris parametrous// void set_date(string _date) { date=_date; } void set_hour(string _hour) { hour=_hour; …

Member Avatar for chrjs
0
162
Member Avatar for Wakesta

Please can someone check that I have understood this part of the code for my game or advise a better way of showing this? [CODE] //-------------------------------- // DIFFICULTY //-------------------------------- void Difficulty() { Top_Border(); cout << "\n Choose computer difficulty level.\n" " (E)asy\n" " (A)verage\n" " (H)ard\n\n" " ? "; cin …

Member Avatar for mrnutty
0
150
Member Avatar for eman 22

Hi all during my implementation to tree data structure, I make a method which combine two trees in one tree and called it attach. I declared 3 trees t1,t2,t3. and then called method attach which will create new tree and put t1 in right and t2 in left and then …

Member Avatar for eman 22
0
90
Member Avatar for Agni

I have been reading the 'inside the c++ object model' by Lippman and one of the sections has me a little confused. It is the section where the author explains how virtual tables are created and virtual pointers assigned, in the scenario of multilevel, single inheritance. If anyone here has …

Member Avatar for Agni
0
324
Member Avatar for hawita

Hi, i am writing a program that plays “guess what number I’m thinking of…” with you. User Inputs guesses and output whether the number is too low, too high, or right-on. I already wrote the program to have the user guess what number the computer is guessing; however, can anyone …

Member Avatar for Moschops
0
148
Member Avatar for ctpsolo

I've created a program that will process a file in a certain manner. The processing works fine, the problem I'm having is to open files that has a " " (space) in their dir or filename. See I wanted to be able to use my program in a easy manner …

Member Avatar for ctpsolo
0
406
Member Avatar for BobFX

Hi, I have a server running with a Form based managed C++ app. It initializes with: [code] try { listener = gcnew TcpListener(ipAddress, PORT_lock); listener->Start(); // Start listening for client requests. listener->BeginAcceptTcpClient(gcnew AsyncCallback(DoAcceptTcpClientCallback), listener); [/code] The callback funtion is defined as: [code] public: static void Form1::DoAcceptTcpClientCallback(IAsyncResult^ result) { try { …

0
95
Member Avatar for BobFX

Hi, I have a stream server application written in C, that I need to incorporate in a GUI C++ managed new program, but I am having trouble finding the equivalent of the C sockets function calls. The C apps initialize this way: [code] /* * Init socket */ if ( …

Member Avatar for BobFX
0
472
Member Avatar for slaidas

my program writes wasd123wasd123, but i dont know how to make it writing 1ws2aasd22ww. How to make random presser? Can someone help me? [CODE] #include <iostream> #include <windows.h> #include <stdlib.h> using namespace std; int main () { for(;;){ Sleep(1000); rand(); keybd_event(VkKeyScan('w'),0,0,0); Sleep(1000); rand(); keybd_event(VkKeyScan('a'),0,0,0); Sleep(1000); rand(); keybd_event(VkKeyScan('s'),0,0,0); Sleep(1000); rand(); keybd_event(VkKeyScan('d'),0,0,0); …

Member Avatar for WaltP
0
146
Member Avatar for pcgamer2008

Hello World ! I want to move a rectangle from going one point to another point in openGl. I am reaching the position but movement is so fast when I execute the program..it already in reached state. how to add delay so that I can see moving rectangle.

Member Avatar for pcgamer2008
0
119
Member Avatar for AODfan

So the first part of this program is to pull int data from a .txt file and put them into an array and then output then on the screen, but it seems that the code I have will only display very odd numbers (i.e. -808459), I do not know where …

Member Avatar for VernonDozier
0
108
Member Avatar for shyla

A file filter reads an input file, transforms it in some way, and writes the results to an output file. Write an abstract file filter class that defines a pure virtual function for transforming a character. Create one subclass of your file filter class that performs encryption, another that transforms …

Member Avatar for shyla
0
1K
Member Avatar for IndianaRonaldo

i need a command in c++ to scan the first keystroke the user enters ....(i.e) user doesnt have to press <enter> key...i need to scan as soon as he types....please help...thanks in advance....

Member Avatar for IndianaRonaldo
0
177
Member Avatar for jimmymack

[CODE]// quote.cpp - Script 4.6 // We need the iostream file in order // to use out and cin. #include <iostream> // We need the string file // For the string functionality #include <string> // Start the main function. int main() { // Declare the necessary variables. std::string quote, speaker; …

Member Avatar for jimmymack
0
212
Member Avatar for ayan2587

Hi guyzz !! I have tried scouting the internet but could not get a suitable explanation. Please tell me with an example as to what are bit arrays and what are their applications. Any help would be greatly appreciated. Thanks

Member Avatar for mrnutty
0
121
Member Avatar for eman 22

[CODE] list<int>* compare(){ list q; q.push_front(1); q.push_front(2); return &q; } [/CODE] this method returns a pointer to an empty list how can I do to return priority_queue contain 1,2.

Member Avatar for Moschops
0
125
Member Avatar for hawita

Hi, How do i write a vector class to manipulate vectors in 3D; manipulate vector components in Cartesian, cylindrical, and spherical coordinate systems; add vectors; multiply by scalars; compute dot and cross products?

Member Avatar for jonsca
-1
120
Member Avatar for hawita

Please help how do i do this program?? Write a program to read data from a large text file. Within the file, the data are arranged in two columns, separated by white space characters, and comprised of a variable number of rows of data, the last of which contains nine …

Member Avatar for rubberman
0
549
Member Avatar for XCC111

Hi can someone please this code for me because i have the same error Here is the code: [icode] // Work please.cpp : Defines the exported functions for the DLL application. // #include "stdafx.h" #include <Windows.h> #include <wchar.h> #define ThreadMake(x) CreateThread(NULL,0, (LPTHREAD_START_ROUTINE)&x,NULL,0,NULL); #define ThreadMakeParam(x, param) CreateThread(NULL,0, (LPTHREAD_START_ROUTINE)&x,param,0,NULL); #define BEEP_ACTIVATED Beep(2000, …

Member Avatar for Ancient Dragon
-1
404
Member Avatar for sergent

I know I may not be ready for this but I want to make a client side application that will talk to a server and be able to inspect element. I know some Windows APIs and C++ but I am not sure how to log in the web-site with the …

Member Avatar for sergent
0
140
Member Avatar for aragant

HEY i am trying to resolve my problem here is the code and the error [quote]2 [main] PA4 2768 exception::handle: Exception: STATUS_ACCESS_VIOLATION 2331 [main] PA4 2768 open_stackdumpfile: Dumping stack trace to PA4.exe.stackdump [/quote] Function [code] void BinarySearchTree::Insert(int val) { BSTNode *node, *p; cout<<node->GetLeftChild(); cout<<node->GetLeftChild(); p=root; node->setData(val); node->SetLeftChild(0); node->SetRightChild(0); if(p==0) { …

Member Avatar for mrnutty
0
193
Member Avatar for TriG0rZ

Hi, I have this: void __fastcall TERDmarker::LecERDClick(TObject *Sender) { LecERD->Picture = *pct; //LecERD->Execute(); } //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- void __fastcall TERDmarker::openimage21Click(TObject *Sender) { TPicture * pct = new TPicture; pct->LoadFromFile("C:\Users\Yassar\Desktop\vpbmp"); // LecERD->Picture = pct; } What i am trying to do is, get openimage2click to open an image and save it to …

Member Avatar for daviddoria
0
85
Member Avatar for hawita

After i have read in a data arranged in two columns, separated by white space characters and comprised of M = 1001 rows(where the data may be considered ordered pairs of points x and y), how do i use linear regression to find the equation of a line that best …

Member Avatar for ravenous
0
160

The End.