请告诉上面程序的代码 [英] plz tell code of the above programme

查看:74
本文介绍了请告诉上面程序的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置A.您可以使用copy()算法在容器内复制序列.但是,当目标序列与源序列重叠时,必须小心.编写一个程序,使您可以使用copy()将任何序列复制到数组中的其他位置.让用户输入first1,last1和first2的值.使用该程序来验证是否可以将与目标重叠的序列向左移动,但不能向右移动.

Set A. You can use the copy() algorithm to copy sequences within a container. However, you must be careful when the destination sequence overlaps the source sequence. Write a program that lets you copy any sequence to a different location within an array, using copy(). Have the user enter values for first1, last1, and first2. Use the program to verify that you can shift a sequence that overlaps its destination to the left, but not to the right.

推荐答案

作为参考,您可以查看memmove函数实现 [ ^ ].
As reference, you may look at memmove function implementation[^].


您应该仔细阅读
http://www.codeproject.com/Messages/2922875/HOW-TO- ASK-A-QUESTION.aspx [ ^ ]

http://whathaveyoutried.com/ [
You should carefully read
http://www.codeproject.com/Messages/2922875/HOW-TO-ASK-A-QUESTION.aspx[^]
and
http://whathaveyoutried.com/[^]


我们不做您的作业:它的设置是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试,您可能会发现它并不像您想的那么困难!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!


这篇关于请告诉上面程序的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆