| |

VerySource

 Forgot password?
 Register
Search
Author: kyo200808

How to use vector as a parameter? Thank you!

[Copy link]

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-5 12:00:01
| Show all posts
There is nothing wrong with using vector, and other problems can be seen in the report. Debugging by yourself should not be a big problem.
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-8-12 00:30:01
| Show all posts
I don’t know the reason. Then there is no problem if only using vector as the parameter. It may be the reasonboxer2005said.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-8-12 01:15:01
| Show all posts
BOOL is the dong dong of Windows, and C++ uses bool
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-13 09:15:01
| Show all posts
What about everyone? Didn't VC tell you what was wrong? Why not post it? ?

I have also written such a function, there is no problem with compiling (no problem when running^_^)
bool ReadString(vector<string>&texts)
{
...
}
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-2 22:00:01
| Show all posts
I encountered a problem similar to the original host: I can define such a function void find in the win32 console program (int aa, int bb, int cc, int cc, vector<int>&ptpairs) // But in MFC It is not possible to add such a function in a single-document program, it is impossible to add it at all, please give me some advice!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list