如何通过引用推送向量?(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

相关问答

更多

Ruby + Action Web Service + SOAP(Ruby + Action Web Service + SOAP)

好的,所以我想出了这个问题,这就是答案:你需要降级到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 th...

在java中使用SOAP Web服务(consuming SOAP web service in java)

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 verb...

如何将现有的肥皂网服务用于春季申请?(How to use existing soap web service into spring application?)

以下步骤可以让您了解从哪里开始第一次肥皂服务 - 1.将依赖项添加到您的pom <dependencies> <dependency> <groupId>org.springframework.ws</groupId> <artifactId>spring-ws-core</artifactId> <version>2.1.3.RELEASE</version> </dependency> <dependency> ...

SSIS Web服务任务,无法执行Web服务(SSIS web service task, can't execute web service)

这是简单的代理问题。 不要忘记在你的Http连接管理器中配置代理标签 It was simple proxy issue. Don't forget to configure the proxy tab in your Http Connection Manager

使用SSIS消费肥皂网服务(Consume a soap web service with SSIS)

以下是一些下载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/steves...

SSIS Web服务任务XmlNode输入可能吗?(SSIS Web Service Task XmlNode Input POSSIBLE?)

看起来唯一的答案是将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 ...

SSIS未从WSDL文件中检测输入服务或方法(SSIS Not Detecting Input Service or Method from WSDL File)

似乎缺少一些配置。 您可以查看此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.

何时使用脚本任务代替SSIS中的sql任务和Web服务任务(When to use script task in place of sql task and web service task in SSIS)

两种方法都可行。 两者都可能导致大致相同的性能 - 通常SQL Server上的查询执行是最慢的部分,并且调用它的方式无关紧要。 但是如果你用C#代码做所有事情并把它放在脚本任务中 - SSIS的好处是什么? 您也可以使用C#完成所有操作并将其放在独立的控制台应用程序中。 通常使用SSIS来避免编写代码,并使用声明性程序定义 - 这是更易于维护,更容易让其他人理解和支持等等。打开包并看到SQL任务和Web服务任务的人将能够理解和调整如果没有打开Script Task并检查代码,会发生什么。 它还需...

使用spring mvc使用SOAP Web服务(consume SOAP web service with spring mvc)

什么是JAXB? 根据我的理解,JAXB用于编组和解组对象? 是的,JAXB是一个框架,可用于将Java对象转换为XML文件(流),反之亦然。 Java对象到XML文件的转换称为编组,反之则编组。 当两个应用程序使用XML交换业务数据时,此技术将非常有用。 2.在同一个春季mvc应用程序中,我可以同时使用宁静的Web服务和SOAP Web服务吗? 是的,您可以根据您的业务需求在同一个项目中同时使用这两个项目。 例如,假设您的应用程序(项目)可能需要来自两个外部来源的数据,即外部系统1(假设它公开了...

使用REST POST方法使用SOAP Web服务(Consume SOAP web service using REST POST method)

SOAP认为标题/正文中的信息与REST不同,但它都是HTTP: # Headers Content-Type: text/xml SOAPAction: <SOAPAction here> # Body <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > <soapenv:Header> . </soapenv:Header> <soapenv:Body> . . . </s...

相关文章

更多

Struts2 Push Tag 引发的问题

按照Struts官网上的CRUD例子,自己实践了一下,结果报错: tag 'push', field ...

Bentley.STAAD.RCDC.V8i.04.01.01.03 1CD

1、Bentley Multiframe Advanced V8i SS3 17.00.02.10 W ...

《Java 2 图形设计卷I:AWT》(Graphic Java 1.2 Mastering the JFC Volume I:AWT )扫描版[PDF]

中文名: Java 2 图形设计卷I:AWT 原名: Graphic Java 1.2 Mast ...

在oracle9i中如何编写sql或者存储过程来知道执行sql或者函数花费的时间?

在oracle9i中如何编写sql或者存储过程来知道执行sql或者函数花费的时间? 比如:我有两种s ...

Mercurial 如何让中央库在每次被push新内容后都自动update?

我在一台服务器上有个仓库,并开启web server 我希望,在其他机器往这台服务器push内容后, ...

I18n的一个问题

升级了,2.2.2, 用了I18n. 问题来了。 以前model validation 出错的默认消 ...

Hadoop的I/O

1. 数据完整性:任何语言对IO的操作都要保持其数据的完整性。Hadoop当然希望数据在存储和处理中不 ...

Hadoop I/O系统介绍

看过很多Hadoop介绍或者是学习的帖子和文章,发现介绍Hadoop I/O系统的很少。很多文章都会介 ...

Who AM I Casting Crowns自我简介

基督教 赞美诗歌 Hymns Lyrics MP3 中文版 英文版 中英对照 音频提取(自动播放): ...

最新问答

更多

python的访问器方法有哪些

使用方法: class A(object): def foo(self,x): #类实例方法 print "executing foo(%s,%s)"%(self,x) @classmethod def class_foo(cls,x): #类方法 print "executing class_foo(%s,%s)"%(cls,x) @staticmethod def static_foo(x): #静态方法 print "executing static_foo(%s)"%x调用方法: a =

使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)

我认为你必须将两个TableGetway传递给UserTable构造。 你必须改变Module.php看看: public function getServiceConfig() { return array( 'factories' => array( 'User\Model\UserTable' => function($sm) { $userTableGateway = $sm->get('UserTable

透明度错误IE11(Transparency bug IE11)

这是一个渲染错误,由使用透明度触发,使用bootstrap用于在聚焦控件周围放置蓝色光环的box-shadow属性。 可以通过添加以下类覆盖来解决它。 .form-control:hover { -webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,255,1); -moz-box-shadow: 0px 0px 5px 0px rgba(0,0,255,1); box-shadow: 0px 0px 4px 0px rgba(0,0,255,1)

linux的基本操作命令。。。

ls 显示目录 mkdir 建立目录 cd 进入目录

响应navi重叠h1和nav上的h1链接不起作用(Responsive navi overlaps h1 and navi links on h1 isn't working)

将z-index设置为.main-nav这将解决您的重叠问题 .main-nav { position:relative; z-index:9; } set z-index to .main-nav This will fix your overlaping issue .main-nav { position:relative; z-index:9; }

在C中读取文件:“r”和“a +”标志的不同行为(Reading a File in C: different behavior for “r” and “a+” flags)

这是因为模式规范"a"打开一个文件以便追加,文件指针在末尾。 如果您尝试从此处读取,则由于文件指针位于EOF,因此没有数据。 您应该打开"r+"进行阅读和写作。 如果在写入之前读取整个文件,则在写入更多数据时,文件指针将正确定位以追加。 如果这还不够,请探索ftell()和fseek()函数。 That is because the mode spec "a" opens a file for appending, with the file pointer at the end. If you

NFC提供什么样的带宽?(What Kind of Bandwidth does NFC Provide?)

支持空中接口的数据速率是一回事。 在消除协议开销,等待eeprom写入以及所有需要时间的其他内容之后,您看到的数据速率是完全不同的故事。 长话短说,从标签读取或进行对等传输时的实际数据速率峰值约为2.5千字节/秒。 取决于具体的标签或对等技术,它可能比这慢很多。 The supported data-rates of the air-interface are one thing. The data-rate that you see after removing protocol overhe

元素上的盒子阴影行为(box-shadow behaviour on elements)

它看起来像只在Windows上的Chrome的错误。 我在Google Canary (Chrome 63)中也进行了测试,问题依然存在,所以有可能它不会很快修复。 这个问题是由overflow: auto引起的overflow: auto ,在你的情况下,它可以很容易地通过删除或设置为可见(默认)来解决。 但是 ,将鼠标悬停在右侧(顶部和底部)时,会出现滚动条。 一个解决方案可以设置overflow: hidden的身体,所以预期的结果是所需的。 我想指出,这不是一个很好的解决方案,但我建议暂

Laravel检查是否存在记录(Laravel Checking If a Record Exists)

这取决于您是否要以后与用户合作,或仅检查是否存在。 如果要使用用户对象(如果存在): $user = User::where('email', '=', Input::get('email'))->first(); if ($user === null) { // user doesn't exist } 如果你只想检查 if (User::where('email', '=', Input::get('email'))->count() > 0) { // user found

设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)

$scope.getData= function () { var reader = new FileReader(); reader.onload = $('input[type=file]')[0].files; var img = new Image(); img.src =(reader.onload[0].result); img.onload = function() { if(this.width > 640