49,756 Topics

Member Avatar for
Member Avatar for amani_1

Write a program that accepts two integers from the user, if any of the integers follow the other, print “ a follow b” otherwise print “***”.

Member Avatar for Warrens80
0
118
Member Avatar for Sonu_2

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 …

Member Avatar for richieking
0
330
Member Avatar for Ahsanali1603

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 …

Member Avatar for Moschops
0
388
Member Avatar for .............

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 :)

Member Avatar for .............
0
519
Member Avatar for Curious Gorge

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 …

Member Avatar for Curious Gorge
0
225
Member Avatar for can-mohan

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: …

Member Avatar for mike_2000_17
0
384
Member Avatar for princessophia

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) …

Member Avatar for iamthwee
0
216
Member Avatar for princessophia

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 …

Member Avatar for iamthwee
0
2K
Member Avatar for cambalinho

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?

Member Avatar for Ancient Dragon
0
244
Member Avatar for Ikanda Simeon

Am having problems converting from if-else statements to switch statements and vice-versa

Member Avatar for L7Sqr
0
191
Member Avatar for word2the wise

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?

Member Avatar for L7Sqr
0
129
Member Avatar for beastie805

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 …

Member Avatar for beastie805
0
2K
Member Avatar for VBOI

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???????

Member Avatar for Nutster
0
3K
Member Avatar for overloaded

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)) …

Member Avatar for overloaded
0
323
Member Avatar for Labdabeta

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 …

Member Avatar for Labdabeta
0
307
Member Avatar for Dannyo329

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 …

Member Avatar for Jamblaster
0
2K
Member Avatar for LINDA NYARKO

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 …

Member Avatar for gerard4143
0
88
Member Avatar for salah_saleh

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 …

Member Avatar for salah_saleh
0
348
Member Avatar for christinetom

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 …

Member Avatar for mike_2000_17
0
370
Member Avatar for saja.omarii.7

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 …

Member Avatar for saja.omarii.7
0
155
Member Avatar for cambalinho

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?

Member Avatar for cambalinho
0
763
Member Avatar for Banfa

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 …

Member Avatar for Banfa
0
152
Member Avatar for johnson_2

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. …

Member Avatar for johnson_2
0
600
Member Avatar for saja.omarii.7

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 …

Member Avatar for saja.omarii.7
0
375
Member Avatar for mixelplik

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 …

Member Avatar for mixelplik
0
132
Member Avatar for cambalinho

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 …

Member Avatar for cambalinho
0
147
Member Avatar for 9tontruck

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 …

Member Avatar for Moschops
0
201
Member Avatar for cambalinho

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)

Member Avatar for cambalinho
0
288
Member Avatar for PulsarScript

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 …

0
88
Member Avatar for royi.navon

//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?

Member Avatar for Nutster
0
102

The End.