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++ – Passing array of vector of pairs by reference

admin by admin
March 30, 2021
Share on FacebookShare on Twitter


Closed. This question needs debugging details. It is not currently accepting answers.



Want to improve this question? Update the question so it’s on-topic for Stack Overflow.

Closed 21 mins ago.



I am trying to pass array of vector by reference as defined here.

Here is how I am trying :

     main()
        {
        
            vector<pair<int, int> > adj[V];
            addEdge(adj, 1, 2, 30);

            ..................
            printGraph(adj, V);
    
        }
    
    void addEdge(vector <pair<int, int> > (&adj) [5], int u,
                                        int v, int wt)
    {
        adj[u].push_back(make_pair(v, wt));
        adj[v].push_back(make_pair(u, wt));
    }

But getting compile time errors? What did I miss?

On the followup note ,can I avoid specifying “5” as a array size in argument of function and keep it blank?

admin

admin

Related Posts

c++ – Index retrieval as a function of the boost::multi_index::sequenced offset

April 21, 2021

c++ – I want to sort the sheet according to the rule

April 20, 2021

c++ – Delete element with specified key and value from std::multimap

April 19, 2021

C++ change list while iterating?

April 19, 2021
Next Post

N538bn ports revenue shows private sector can generate more for govt

Leave a Reply Cancel reply

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

Recommended.

Tourism expert warns against unbridled population growth

Tourism expert warns against unbridled population growth

December 27, 2020

Asiwaju Bola Tinubu Visits Maiduguri – (Photos)

December 14, 2020

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

Oxygen 5.9 – WooCommerce WordPress Theme

Preston 1.2.1 – Real Estate WordPress Theme

Support Board 3.2.4 – WordPress Chat Plugin

YITH WooCommerce Customize My Account Page 3.1.1 Nulled

YITH Cost of Goods for WooCommerce 1.2.13 Nulled

BoomBox 2.7.7 Nulled – Viral Magazine WordPress Theme

Calendarista 13.3 – Premium WordPress Booking Plugin

Starto 1.7.2 Nulled – Saas Software Startup WordPress

BioLinks 7.0.0 Nulled – Instagram & TikTok Bio Links & URL Shortener

WizeStore 1.14.5 Nulled – Multipurpose WooCommerce Shop

Midone 3.0.4 – Laravel 8 Admin Dashboard Template + HTML Version + XD Design File

Mosto 4.0.1 – App Landing Page

An open-source public transport app

Infix LMS 2.0.1 Nulled – Learning Management System

An open-source pubic transport app

  • 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