首页 \ 问答 \ 如何通过引用推送向量?(How do I push vectors by reference?)

如何通过引用推送向量?(How do I push vectors by reference?)

下面的代码不起作用,因为我将矢量a和b推回到矢量矢量,然后改变矢量a和b。 我想改变矢量a和b,以便矢量矢量遭受相同的修改。 我该怎么做呢?

#include <iostream>
#include <vector>

int main()
{
std::vector<std::vector<int>>vector;
std::vector<int>a;
std::vector<int>b;
vector.push_back(a);
vector.push_back(b);
for (int i = 1; i <= 10; i++)
    a.push_back(i);
for (int i = 11; i <= 20; i++)
    b.push_back(i);
std::cout << vector[1][0];
std::cin.get();
}

This code below doesn't work because I push_back the vectors a and b to the vector vector and then alter the vectors a and b. I want to alter the vectors a and b so that the vector vector suffers the same modifications. How do I do this?

#include <iostream>
#include <vector>

int main()
{
std::vector<std::vector<int>>vector;
std::vector<int>a;
std::vector<int>b;
vector.push_back(a);
vector.push_back(b);
for (int i = 1; i <= 10; i++)
    a.push_back(i);
for (int i = 11; i <= 20; i++)
    b.push_back(i);
std::cout << vector[1][0];
std::cin.get();
}

原文:https://stackoverflow.com/questions/50614970
更新时间:2024-04-21 20:04

最满意答案

以下是一些下载soap请求的VBScript代码示例:

http://example-code.com/vbscript/http_soap.asp

http://gallery.technet.microsoft.com/scriptcenter/deed3efb-1e11-4e7e-8bfd-96a981de5c35

如果您认为这是您想要的方向,我可以提供帮助。 但我想你可能会得到相同的错误信息。 这是使用powershell的一个:

http://www.iislogs.com/steveschofield/execute-a-soap-request-from-powershell


Here are some examples of VBScript code that downloads a soap request:

http://example-code.com/vbscript/http_soap.asp

http://gallery.technet.microsoft.com/scriptcenter/deed3efb-1e11-4e7e-8bfd-96a981de5c35

If you think this is the direction you want to go in I could help. But I guess you might just get the same error message. and here's one using powershell:

http://www.iislogs.com/steveschofield/execute-a-soap-request-from-powershell

相关问答

更多
  • 好的,所以我想出了这个问题,这就是答案:你需要降级到Rails 1.xx并按照教程进行操作。 不幸的是,我在本月的搜索没有给出关于在Rails 2或Rails 3上工作的AWS的结果。 OK, so I figured out this question and here is the answer: you need to downgrade to Rails 1.x.x and follow the tutorials. Unfortunately, my searches during the mon ...
  • SOAP基本上是使用POST方法将XML提交到Web服务器。 虽然XML可能会变得冗长,但您应该能够使用StringBuilder构造XML,然后使用简单的HTTP客户端(如Apache HttpClient)使用XML字符串作为正文来构造对URL的POST请求。 这就像他们来的一样简单。 SOAP is basically the submission of XML to a web server using the POST method. While the XML can get verbose, ...
  • 以下步骤可以让您了解从哪里开始第一次肥皂服务 - 1.将依赖项添加到您的pom org.springframework.ws spring-ws-core 2.1.3.RELEASE
  • 这是简单的代理问题。 不要忘记在你的Http连接管理器中配置代理标签 It was simple proxy issue. Don't forget to configure the proxy tab in your Http Connection Manager
  • 以下是一些下载soap请求的VBScript代码示例: http://example-code.com/vbscript/http_soap.asp http://gallery.technet.microsoft.com/scriptcenter/deed3efb-1e11-4e7e-8bfd-96a981de5c35 如果您认为这是您想要的方向,我可以提供帮助。 但我想你可能会得到相同的错误信息。 这是使用powershell的一个: http://www.iislogs.com/steveschofi ...
  • 看起来唯一的答案是将Web服务更改为仅接受简单类型作为参数。 我已经搜索过网络,似乎没有办法动态创建复杂类型供Web服务任务中的输入值使用。 另请参阅: 为Web服务任务创建复杂类型变量 It looks like the only answer is to change the web service to accept only simple types as parameters. I have scoured the web and there seems to be no way to dynam ...
  • 似乎缺少一些配置。 您可以查看此SSIS Web服务任务一步一步的文章。 如果Web服务使用证书,则需要将其安装到您的计算机上。 I wasn't able to get any GUI solutions to work, so I eventually wrote a custom script task to get around it.
  • 两种方法都可行。 两者都可能导致大致相同的性能 - 通常SQL Server上的查询执行是最慢的部分,并且调用它的方式无关紧要。 但是如果你用C#代码做所有事情并把它放在脚本任务中 - SSIS的好处是什么? 您也可以使用C#完成所有操作并将其放在独立的控制台应用程序中。 通常使用SSIS来避免编写代码,并使用声明性程序定义 - 这是更易于维护,更容易让其他人理解和支持等等。打开包并看到SQL任务和Web服务任务的人将能够理解和调整如果没有打开Script Task并检查代码,会发生什么。 它还需要较少的开 ...
  • 什么是JAXB? 根据我的理解,JAXB用于编组和解组对象? 是的,JAXB是一个框架,可用于将Java对象转换为XML文件(流),反之亦然。 Java对象到XML文件的转换称为编组,反之则编组。 当两个应用程序使用XML交换业务数据时,此技术将非常有用。 2.在同一个春季mvc应用程序中,我可以同时使用宁静的Web服务和SOAP Web服务吗? 是的,您可以根据您的业务需求在同一个项目中同时使用这两个项目。 例如,假设您的应用程序(项目)可能需要来自两个外部来源的数据,即外部系统1(假设它公开了它在SOA ...
  • SOAP认为标题/正文中的信息与REST不同,但它都是HTTP: # Headers Content-Type: text/xml SOAPAction: # Body . . . .

相关文章

更多

最新问答

更多
  • 带有简单redis应用程序的Node.js抛出“未处理的错误”(Node.js with simple redis application throwing 'unhandled error')
  • 高考完可以去做些什么?注意什么?
  • Allauth不会保存其他字段(Allauth will not save additional fields)
  • Flask中的自定义中止映射/异常(Custom abort mapping/exceptions in Flask)
  • sed没有按预期工作,从字符串中间删除特殊字符(sed not working as expected, removing special character from middle of string)
  • 怎么在《我的世界》游戏里面编程
  • .NET可移植可执行文件VS .NET程序集(.NET Portable Executable File VS .NET Assembly)
  • 搜索字符串从视图中键入两个字段的“名字”和“姓氏”组合(Search Strings Typed from View for Two Fields 'First Name' and 'Last Name' Combined)
  • 我可以通过配置切换.Net缓存提供程序(Can I switch out .Net cache provider through configuration)
  • 在鼠标悬停或调整浏览器大小之前,内容不会加载(Content Does Not Load Until Mouse Hover or Resizing Browser)
  • 未捕获的TypeError:auth.get不是函数(Uncaught TypeError: auth.get is not a function)
  • 如何使用变量值创建参数类(How to create a parameter class with variant value)
  • 在std :: deque上并行化std :: replace(Parallelizing std::replace on std::deque)
  • 单元测试返回Connection对象的方法(Unit Test for a method that returns a Connection object)
  • rails:上传图片时ios中的服务器内部错误(rails: server internal error in ios while uploading image)
  • 如何在Android中构建应用程序警报[关闭](How build an application Alarm in Android [closed])
  • 以编程方式连接到Windows Mobile上的蓝牙耳机(Programmatically connect to bluetooth headsets on Windows Mobile)
  • 在两个不同的SharedPreference中编写并获得相同的结果(Writing in two different SharedPreference and getting the same result)
  • CSS修复容器和溢出元素(CSS Fix container and overflow elements)
  • 在'x','y','z'迭代上追加数组(Append array on 'x', 'y', 'z' iteration)
  • 我在哪里可以看到使用c ++源代码的UML方案示例[关闭](Where I can see examples of UML schemes with c++ source [closed])
  • SQL多个连接在与where子句相同的表上(SQL Multiple Joins on same table with where clause)
  • 位字段并集的大小,其成员数多于其大小(Size of bit-field union which has more members than its size)
  • 我安装了熊猫,但它不起作用(I installed pandas but it is not working)
  • Composer - 更改它在env中使用的PHP版本(Composer - Changing the version of PHP it uses in the env)
  • 使用JavaFX和Event获取鼠标位置(Getting a mouse position with JavaFX and Event)
  • 函数调用可以重新排序(Can function calls be reordered)
  • 关于“一对多”关系的NoSQL数据建模(NoSQL Data Modeling about “one to many” relationships)
  • 如何解释SBT错误消息(How to interpret SBT error messages)
  • 调试模式下的Sqlite编译器错误“初始化程序不是常量”(Sqlite compiler errors in Debug mode “initializer is not a constant”)