Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~12.6K People Reached
Favorite Tags
Member Avatar for aluhnev

//Hi all,could someone explain the make_shared(), is it used to substitute constructor? //Here is an example void DoAddStaff(vector<Ptr>& container) { cout << "\nEnter type of employee to add ('W' for waged, 'S' for salaried): "; char c; cin >> c; cin.ignore(); if( c == 'w' || c == 'W' ) …

Member Avatar for vijayan121
0
248
Member Avatar for aluhnev

//This is my code,how do i find & print max value namespace StartCSharp { class Program { static void Main(string[] args) { int [, ] a = new int [4,4] {{2,3,4,5}, {34,56,25,67}, {22,44,55,77},{45,80,22,13}}; foreach (int x in a) Console.WriteLine(x); } } } ///Thank you.

Member Avatar for ZER09
0
238
Member Avatar for aluhnev

//HI All what is wrong with this code,i try to declare 4 dim. array int [, , ,] a = new int [3,4] = {{2,3,4,5}, {34,56,25,67}, {22,44,55,77}}; //how do i declare it an assign values to it?Thanks.

Member Avatar for aluhnev
0
154
Member Avatar for aluhnev

//Hi i do the delivery company project,this are my members of the base class //how do i create 2 constructors in base,one for sender and one for recipient? //I did one for sender ,but visual studio does not allow me to create identical for recipient //Can some one help to …

Member Avatar for rubberman
0
252
Member Avatar for aluhnev

//Hi all,can someone help with this problem //I am stack,need to output all functions in main,with user input for queue and stack,but first queue //This is my .h and .cpp of queue #include "stdafx.h" template <class ItemType> struct NodeType; template <class ItemType> class QueType { public: QueType(); // Class constructor. …

Member Avatar for richieking
0
193
Member Avatar for aluhnev

//Hi all,can you please explain why using this-> in this code is optional,that is the purpose? //Code can work with not this-> too. CTime_24 operator+(int seconds); CTime_24 CTime_24 :: operator+(int seconds) { CTime_24 temp; temp.m_Seconds = this->m_Seconds + seconds; temp.m_Minutes = this->m_Minutes + temp.m_Seconds / 60; temp.m_Seconds %= 60; temp.m_Hours …

Member Avatar for aluhnev
0
146
Member Avatar for aluhnev

//why the getters declared twice,public,and than protected at the end of this code? And how to assign the copy constructor between this 2 classes? class Person { private: string name; string address; string city; string state; string zipCode; public: Person() {} Person(const string& aName, const string& anAddress, const string& aCity, …

Member Avatar for rubberman
0
153
Member Avatar for aluhnev

//Hi,i need to create programm,which takes the user input,determins how many digits in integer // and than raise this digit to power,what was entered by user too. //first function noraml,second one to rais to power recursive. So if user enter number //234,this is 3 digits,so now need recurcively 3 raise …

Member Avatar for Banfa
0
271
Member Avatar for aluhnev

//Hi all,can you explain how to call this function in main. //i ask user to enter the number,like this is it correct in main,recursevely call function? bool isPrime(int n, int d); int main() { int number; cout <<"Enter number >= 1"; cin >> number; if(isPrime(number)) { return cout << "Yes"; …

Member Avatar for aluhnev
0
5K
Member Avatar for aluhnev

//Hi,can someone explain the meaning of [size -2],why not [size -1],if we narrowing the string int palindrome(char str[], int size); int main() { cout << "Enter a string: "; char str[20]; cin.getline(str,20,'\n'); cout << "The entered string " << ( (palindrome(str,strlen(str)+1))? "is":"is not" ) << " a Palindrome string." << …

Member Avatar for tinstaafl
0
234
Member Avatar for aluhnev

int Cabin (int n); int _tmain(int argc, _TCHAR* argv[]) { cout << Cabin(8) << endl; return 0; } int Cabin (int n) { if (n == 1) return 0; else return Cabin(n/2) + 1; } Hi ,can someone explain why is the answer 3 here:if to folow the formula the …

Member Avatar for aluhnev
0
257
Member Avatar for aluhnev

//Hi Lads.This is my first attempt to create template functions. //Here is the main ,which needed to create Locate.h file/header and //in that Locate.h create templates to support the main. //If the value does not exist in the array, -1 is returned. // Templates.cpp : Defines the entry point for …

Member Avatar for aluhnev
0
190
Member Avatar for aluhnev

//Hi all ,can you explain why does this functon has two returns? //How to read them? Is it like if/else? int _tmain(int argc, _TCHAR* argv[]) { int x, n; int res; int power(int, int); cout << "Enter a number:"; cin >> x; cout << "Enter a power:"; cin >> n; …

Member Avatar for cgeier
0
173
Member Avatar for aluhnev

Hi all,have this code: Hi all,have this code: How do i implement binary search to display item.. found at index.. #include "stdafx.h" #include<fstream> #include<iostream> #include<string> #include<iomanip> using namespace std; struct sDetails{ int kNum; string Name; }; int _tmain(int argc, _TCHAR* argv[]) { sDetails students[5]; ifstream infile; infile.open("student.txt"); for (int i …

Member Avatar for tinstaafl
0
151
Member Avatar for aluhnev

Hi,i used this example for practicing,supposed to be easy one,but,abit confusing. Can you help to solve and point to mistakes i've done. Postman Pat became bored one night at the postal sorting office and to break the monotony of the nightshift, he carried out the following experiment with a row …

Member Avatar for Lerner
0
707
Member Avatar for aluhnev

Comuter reboots itself 2-3 times each time at start up(at booting time) ,after giving a blue screen. Checked the error with blue screen viewer and it says problem with Hardware abstract layer,none page fault in none page area. Really annoing ,each time i start,need to wait this circle to pass.Any …

Member Avatar for rubberman
0
106
Member Avatar for aluhnev

Hi,i used this example for practicing,supposed to be easy one,but,abit confusing. Can you help to solve and point to mistakes i've done. Postman Pat became bored one night at the postal sorting office and to break the monotony of the nightshift, he carried out the following experiment with a row …

Member Avatar for aluhnev
0
374
Member Avatar for aluhnev

//HI,need help to extract info from text file and display. //Here is my text file called Report.txt 01 09 2014 john 3.4 12.5 9.5 02 09 2014 freddy 3.4 12.5 9.5 03 09 2014 conor 3.4 12.5 9.5 04 09 2014 mike 3.4 12.5 9.5 05 09 2014 john 3.4 …

Member Avatar for tinstaafl
0
473
Member Avatar for aluhnev

#include "stdafx.h" #include<iostream> #include<fstream> #include<string> #include<vector> using namespace std; struct DATE{ int day; int month; int year; }; struct onDutyRecords{ string name; double sunshine; double rainfall; double midTemp; DATE date; }; onDutyRecords person; int ShowMenu(void); void ListDaysOnDutyOfMet(vector <onDutyRecords> &); void ListAllTheWetDays(vector <onDutyRecords> &); void ListDaysOnDutyOfMet(vector <onDutyRecords> &); void ListAllTheSunnyDays(vector <onDutyRecords> …

Member Avatar for JasonHippy
0
327
Member Avatar for aluhnev

Hi everyone. I have a bit confusion about vector. here is my 2 structs <global>and in the main have vector declared. file name is"report.txt" Have file with meteo readings,like • the meteorologist’s name on duty that day (a string of up to 12 characters) • hours of sunshine (double) • …

Member Avatar for jBat
0
198
Member Avatar for aluhnev

Hi can any one tell me please does visual studio 2012 support any features of c++11? Or only in 2013 version?

Member Avatar for mike_2000_17
0
259
Member Avatar for aluhnev

class Animal { string _name; string _type; string _sound; // private constructor prevents construction of base class Animal(){}; protected: // protected constructor for use by derived classes Animal(const string & n, const string & t, const string & s) : _name(n), _type(t), _sound(s) {} public: void speak() const; const string …

Member Avatar for NathanOliver
0
221
Member Avatar for aluhnev

Hi,can you explain the use of **for_each and lambda** in c++11.What are they for,how to use? I have seen a few examples but do not get the meaning.Thank you.

Member Avatar for Hiroshe
0
205
Member Avatar for aluhnev

Hi i started the book c++ from ground up,but looks like it's too old.I came across the bonded array.Question- what are they,where to use them,how and are they still used in c++11? Thank you .

Member Avatar for Hiroshe
0
634
Member Avatar for aluhnev

The containers SET/VECTOR/LIST/MAP are very similar in use,so how to choose which one to use? Is where any special cases? Thanks

Member Avatar for mike_2000_17
0
273
Member Avatar for aluhnev

//Hi,can someone explain what is the difference of declaring the main in C++/C++11 //What is most common may to use or it's metter of personal choice? int main() { return 0; } /////////////////// int _tmain(int argc, _TCHAR* argv[]) { return 0; } /////////////////// int main( int argc, char ** argv …

Member Avatar for NathanOliver
0
349
Member Avatar for aluhnev

#include<utility> #include<tuple> #include "stdafx.h" #include<string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { pair<int, string>p(42, "forty-two"); cout << p.first << " " << p.second << endl; p = make_pair<int,string>(112,"one-one-two") ; cout << p.first << " " << p.second << endl; return 0; } // Can some one help to …

Member Avatar for aluhnev
0
227
Member Avatar for aluhnev

#include "stdafx.h" #include<vector> #include<iostream> using namespace std; int main( int argc, char ** argv ) { // from initializer list (C++11) cout << "vector from initializer list (C++11): " << endl; vector<int> vi1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; cout << "size: " …

Member Avatar for sepp2k
0
197