49,756 Topics
![]() | |
Write a program that accepts two integers from the user, if any of the integers follow the other, print “ a follow b” otherwise print “***”. ![]() | |
How can I create an array of pointer using **P and point it to NULL? Let's say I have coded as below . struct s { float a ; char x ; } ; s **p ; p = new ( s * [10] ) ; Now I want to … | |
You have to implement a file system that should have the following specifications. On the execution of your code your console should display the following options to the user. 1. Create a new file. 2. List & view existing files. 3. Copy file from windows (*.txt). 4. Copy file to … | |
My application requires a dialog box and a parent window, from the window proc of the parent window I'm trying to draw on the dialog box. How might I do this? Thank you for reading :) | |
The title of this is slightly misleading but its also specific to what I'm asking. I've got a project which uses Ogre and CEGUI. I'm only trying to get CEGUI up and running. I don't know that much about compilers and IDE's but I can program and I also read … | |
Hi , I need to implement efficient search algoritham for comma separated list of MSISDN's that needs to be loaded in memory (left side of '|') character. Followed by the comma separated series of MSISDN's that needs to be searched in the above huge list(millions)(right side of '|' character). Example: … | |
I have to create a program that uses a class Pstring derived from the STL class. The only error I am getting says that I have one unresolved external. How do I fix this? Here is my code: #include <string> class Pstring : public std::string { public: Pstring(const std::string &text) … ![]() | |
This is the assignment: Assuming that a year has 365 days, write a class named DayOfYear that takes an integer representing a day of the year and translates it to a string consisting of the month followed by day of the month. For example, Day 2 would be January 2 … ![]() | |
see these class: class test { public: void Created(){}; test() { Created(); } }; now we can create objects from it. ok. but can i overloading the scope-resolution ('::') for the object accept and change the Created() function? | |
Am having problems converting from if-else statements to switch statements and vice-versa | |
Hi group, I am searching for a complete word list A thru Z. No definitations, parts of speech, or origins of the words. Just a comprehensive, unabrigded listing. Any suggestions? | |
hello, I am having problem with selection sort, I am trying to sort the students name alphabetically.I compile it and it shows me whole bunch of errors in VS. I dont think it has do to do with my display all students function, I think it has more to do … | |
Here is a function to print my binary search node tree, void printtree(struct node *tree) { if (tree!=NULL) { printtree(tree->left); printf("%s %d\n",tree->word, tree->lineNumber); printtree(tree->right); } } How would I save what I print to a text file??????? | |
Unhandled exception at 0x561330d9 (msvcr100d.dll) in main.exe: 0xC0000005: Access violation reading location 0x440b4bd8. i try my best to debug it, but don't have clue on it. **fft.h** #include <math.h> #include <stdio.h> #include <stddef.h> #include <stdlib.h> #define NR_END 1 #define FREE_ARG char* #define M_PI 3.14159265358979323846264338327 static double sqrarg; #define SQR(a) ((sqrarg=(a)) … | |
Hello, I am having a particularly nasty case of "What is the syntax?" while working on an event driven library. Basically this is what I want: class Object {// private: public: virtual bool onEvent(Event e)=0;//all objects have to react to events Object operator|(const Object &o) { // I want to … | |
I've been trying to fix a problem with getline() and cin.getline().Here's a example I've made and it still has the problem: [TEX]" No matching function to 'getline(std::istream&, char[100])' "[/TEX] Here's the code: [CODE] #include <iostream> #include <windows.h> #include <string> using namespace std; int main() { char name[100]; cout << "\nEnter … | |
this programme should calculate users amount of watt consumed based on their appliances and the approximate number of hours is used in a day, week or month. the basic requirements are; give user option of selecting predefined home appliances or entering their own and corresponding watts per appliance,list home appliances … | |
Hi, I have faced a problem that I have a vector in my class which I would like to initialize using constructor initialization list with some thing like this std::vector<double>({1,4,5}) which is only allowed in c++11 which is not what I am looking for. I could only intialize it with … | |
Hi everyone. Well, I'm overwhelmed with the amount of C++ books out there and own a few now. I'm specifically looking for a C++ Reference book which lists C++ STL libraries and functions like the orielly C++ pocket references on C++ or STL. Orielly's C++ in a Nutlshell looks pretty … | |
this is the question : Write C++ a program that reads a person's age in years and print his/her age group. See the table below. Age------------Group name 1 year---------Childhood 2-3 years------Infancy 4-5 years------Preschool-Age 6–12 years-----School-Age 13–17 years----Adolescence 18–29 years----Young-Adulthood 30–39 years----Thirties 40–64 years----Middle-Age 56–48 years----Aged 85 years ------Very-Old You HAVE … | |
when we create the window, we can choose some styles. but i see 2 problems: - how can i hide the border?(i have seen the msdn styles, but theres no const for that) - how can i change the styles after create the window? | |
Consider this piece of code class Example { }; class ExampleAccessor { public: struct ConstructionFlag { ConstructionFlag() { } ~ConstructionFlag() { } }; explicit ExampleAccessor(Example&) { } ExampleAccessor(Example&, const ConstructionFlag&) { } }; int main() { ExampleAccessor accessor(ExampleAccessor::ConstructionFlag()); } Which is the minimal example of something I found in our … | |
I am new to socket programming and I am trying to establish a connection between my client and server and if it's successful the user can 1) -Input message, the message will be send to the server -the server will send a "I got your msg" back to the client. … | |
Write C++ a program that reads a person's age in years and print his/her age group. See the table below. Age Group name 1 year Childhood 2-3 years Infancy 4-5 years Preschool-Age 6–12 years School-Age 13–17 years Adolescence 18–29 years Young-Adulthood 30–39 years Thirties 40–64 years Middle-Age 56–48 years Aged … | |
I was working on a praxctice program and wanted some numbers fixed dollar amounts to 2 decimal places while others to be displayed as plain old ints. I used this code, but noticed that now ALL numbers are set as fixed 2 place decimals. Is this how fixed and setprecisioun … | |
i'm learning win32 from: http://www.winprog.org/tutorial/start.html but tell me(because i ear several persons) is these function correct? LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_CLOSE: DestroyWindow(hwnd); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hwnd, msg, wParam, lParam); } return 0; } the DefWindowProc() is … | |
class Base{ Base(); ~Base(); void doSomrthing(); } Class MyCLass : public Base{ std::string name; MyCLass(); ~MyCLass(); void init(); } MyCLass::MyCLass() { init(); //runtime error occurs with this line } void MyCLass::init() { name = "MyClass"; doSomrthing(); } I am having a trouble on calling child class' contructor. What is wrong … | |
how can i test if the wheel move was negative or positive? i belive these detect the mouse position: xPos = GET_X_LPARAM(lParam); yPos = GET_Y_LPARAM(lParam); but how can i test if any key(like alt\control\shift) was pressed? (i'm talking in same message) | |
here is the code #include "stdafx.h" using namespace std; void GetPicture( ifstream& infile, int picture[8][8]); void GetCanvas( ifstream& infile, int canvas[45][75]); void InitBlank( int blank[8][8]); void InsertPictureInCanvas( int picture[8][8], int canvas[45][75], int startrow, int startcol); void ShowCanvas( int canvas[45][75] ); void Delay(int time); int _tmain(int argc, _TCHAR* argv[]) { //load … | |
//A1 = 1 //An = An-1 +sqrt(An-1) for n > 1. //i need to find An of the series according to the estimation An=(n^2)/4 //how do i write a member of the series, let's say "An" in the code and to apply "n>1" in the code? |
The End.