Ventacademy
  • Socials
  • Business Fundamentals
    • Investments
  • High Income Skills
  • Programming
  • Software Review
  • Website Development
    • WordPress
    • Search Engine Optimization
    • Free Templates and Plugins
      • Support
  • Finance
No Result
View All Result
Knowledge base
No Result
View All Result
Home Support

c++ – Deprication in the statement in the vector

admin by admin
February 7, 2021
Share on FacebookShare on Twitter


#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;

template <class T> struct Out
{
    ostream& out;
    Out(ostream& o):out(o){}
    void operator()(const T& val){out<<val<<" ";}
    
};


int main() {
   
    int t[]={3,2,4,1,5,6,10,8,7,9};
    vector<int> v1(t,t+10);
    for_each(v1.begin(),v1.end(), bind2nd(plus<int>(),1));
    for_each(v1.rbegin(), v1.rend(), Out<int>(cout)); cout<<endl;


    return 0;
    
}

Hello everyone. I have question about this code.
When I run this code and the result states for_each(v1.begin(),v1.end(), bind2nd(plus(),1)); is deprecated.
I am not sure why this statement is appeared and how can I fix this?
Thank you.

admin

admin

Related Posts

News – Become an Early Adopter With the Gutenberg Plugin – WordPress.org

April 21, 2021

c++ – Should the deallocate function be called when an error occurs in the STL allocator allocate?

April 21, 2021

c++ – How to understand deque :: iterator it;

April 21, 2021

c++ – Is the std::function object itself thread safe? If no, what ways can I make it thread safe?

April 21, 2021
Next Post

LiveCanvas 1.8.4 - Bootstrap 4 WordPress Page Builder

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended.

Fantastic Fruit: Texture and Form with Anna Mason

Fantastic Fruit: Texture and Form with Anna Mason

November 27, 2020

Win A Year’s Supply Of Earth Kind Hair Care || Hip And Healthy

April 8, 2021

Subscribe.

Trending.

No Content Available

About Us

Knowledge base

We bring you the best technology news, Finance news and lots more. you can download premium themes, plugins scripts, courses and lots more here.

Follow Us

Categories

  • All
  • Books
  • Business Fundamentals
  • Finance
  • Free Course
  • Free download
  • Free Templates and Plugins
  • Health
  • High Income Skills
  • Investments
  • NSFW
  • Photography
  • Search Engine Optimization
  • Software Review
  • Support
  • Technical Analysis
  • Website Development
  • Wordpress
  • World

Activity

FREEDOWNLOAD

Symbolic names for character codes in Dart

Convert Pro 1.6.0 Nulled + Addon – Lead Generation Tool for WordPress

Spain In The EU

Tailwind CSS : The Complete Guide ( Project Included ) – Download Udemy Paid Courses For Free

React Next.js – Cookie Based Secure Authentication System – Download Udemy Paid Courses For Free

The Complete Node.js Developer Course (3rd Edition) – Download Udemy Paid Courses For Free

[PacktPub] Frontend Web Development Bootcamp – Build a Twitter Clone [Video] | PacktPub Free Courses Online Free Download Torrent

WP File Download 4.9.10 + Cloud Addon – File Manager WordPress Plugin

WP Media Folder 5.3.16 – WordPress Media Library

WPNotif 2.3.0.13 Nulled – WordPress SMS & WhatsApp Message Notifications

TotalContest Pro 2.3.1 – Photo, Audio and Video Contest WordPress Plugin

Jannah 5.4.2 Nulled – Newspaper Magazine News BuddyPress AMP

Mailster 2.4.18 Nulled – Email Newsletter Plugin for WordPress

Profile Builder Pro 3.4.3 Nulled – Profile Plugin for WordPress

Automatically generates native code for adding splash screens in Android and iOS

  • Socials
  • About
  • Advertise
  • Privacy & Policy
  • Contact

© 2020 Ventacademy

No Result
View All Result
  • Socials
  • Business Fundamentals
    • Investments
  • High Income Skills
  • Programming
  • Software Review
  • Website Development
    • WordPress
    • Search Engine Optimization
    • Free Templates and Plugins
      • Support

© 2020 Ventacademy