49,761 Topics

Member Avatar for
Member Avatar for princessophia

This is the problem: Write a class EncryptableString that is derived from the STL string class. The Encryptable string class adds a member function void encrypt( ) that encrypts the string contained in the object by replacing each letter with its successor in the ASCII ordering. For example, the string …

Member Avatar for tinstaafl
0
1K
Member Avatar for VUEKID

What is the best way to read a text file and print to console, then grab that string and convert string to a const char?

Member Avatar for iamthwee
0
494
Member Avatar for VBOI

Instead of entering text to console, I want to use the text from a text file and use this function and method to do a concordance count of words and how many times they appear in the text file. check line 137 #include "stdafx.h" #include<stdio.h> #include<stdlib.h> #include<string.h> #include<conio.h> #include<ctype.h> #include …

Member Avatar for iamthwee
0
177
Member Avatar for KAMAE94

a C++ program that reads in two partially filled arrays. One array contains student IDs (with int type) and the other contains GPAs (with double type). The program will sort the two arrays according to the student ID and print out the results?

Member Avatar for iJimJones
0
156
Member Avatar for prettyknitty

I have been working on this code (school assignment) for a few days now. It seems to be almost finished, but I am not sure what's going on. When I run it in an online complier, it displays correctly, which is supposed to look something like this "12345" "1234500000" However, …

Member Avatar for Ancient Dragon
0
906
Member Avatar for skyyadav

#ifndef BASE_H #define BASE_H class Base { public: int m_nValue; Base(int nValue=0) : m_nValue(nValue) { std::cout << "Base" << std::endl; } }; #endif #ifndef DERIVED_H #define DERIVED_H #include "Base.h" class Derived: public Base { public: double m_dValue; Derived(double dValue=0.0) : m_dValue(dValue) { std::cout << "derived se" << std::endl; } friend …

Member Avatar for gerard4143
0
318
Member Avatar for cambalinho

the function is a std::function<void(string a) write; ok.... it's void.... but why the error about it??? what means these error?

Member Avatar for richieking
0
138
Member Avatar for cambalinho

i understand that the macro is a code that is changed before compile it. so i did these macro with these code: #define (events2((y),(x))) (class events3 : public ( y ) { events3(); ~events3(); }(x) ; ) //#define (events2((y),(x))) (class events3 : public ( y ) { events3(); }(x) ; …

Member Avatar for Ancient Dragon
0
223
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
535
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
192
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
325
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
308
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
349
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
372
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
766
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

The End.