小编G-7*_*-71的帖子

将列表元素移动到STL中的末尾

我已经有了CDrawObject*的列表指针

std::list<CDrawObject*> elements;
Run Code Online (Sandbox Code Playgroud)

我如何将一些元素移动到列表的末尾.我看到STL算法参考,但我没有找到这个操作.我怎么能这样做?

c++ stl list

30
推荐指数
1
解决办法
2万
查看次数

如何在Linux(Ubuntu OS)中检测C++应用程序的内存泄漏?

如何在Linux(Ubuntu OS)中检测C++应用程序的内存泄漏?你可以为这个目标建议我的课程是什么?

c++ linux ubuntu memory-leaks

26
推荐指数
1
解决办法
3万
查看次数

蟒蛇.IOError:[Errno 13]权限被拒绝:当我正在复制文件时

我有两个文件夹:In,Out - 它不是磁盘D上的系统文件夹: - Windows 7. Out包含"myfile.txt"我在python中运行以下命令:

>>> shutil.copyfile( r"d:\Out\myfile.txt", r"D:\In" )

Traceback (most recent call last):
  File "<pyshell#39>", line 1, in <module>
    shutil.copyfile( r"d:\Out\myfile.txt", r"D:\In" )
  File "C:\Python27\lib\shutil.py", line 82, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: 'D:\\In'
Run Code Online (Sandbox Code Playgroud)

有什么问题?

python windows windows-7

26
推荐指数
3
解决办法
5万
查看次数

在ubuntu中编译GLUT时出错

我尝试编译一些"hello world"过剩申请:

#include <stdlib.h>

#include <GL/gl.h>

#include <GL/glu.h>

#include <GL/glut.h>

GLint Width = 512, Height = 512;

const int CubeSize = 200;

void Display(void)
{
    int left, right, top, bottom;

    left  = (Width - CubeSize) / 2;
    right = left + CubeSize;
    bottom = (Height - CubeSize) / 2;
    top = bottom + CubeSize;

    glClearColor(0, 0, 0, 1);
    glClear(GL_COLOR_BUFFER_BIT);

    glColor3ub(255,0,0);
    glBegin(GL_QUADS);
      glVertex2f(left,bottom);
      glVertex2f(left,top);
      glVertex2f(right,top);
      glVertex2f(right,bottom);
    glEnd();

    glFinish();
}

void Reshape(GLint w, GLint h)
{
    Width = w;
    Height = h; …
Run Code Online (Sandbox Code Playgroud)

c++ opengl glut glu

17
推荐指数
2
解决办法
4万
查看次数

如何在linux中使用objdump和bash函数在共享对象文件中找到函数?

我在linux中有一个文件夹,它包含几个共享对象文件(*.so).如何在linux中使用objdump和bash函数在共享对象文件中找到函数?

例如,以下示例func1在mylib.so中找到我的函数:

objdump -d mylib.so | grep func1
Run Code Online (Sandbox Code Playgroud)

但我想找到func1包含共享对象文件的文件夹.我不知道bash语言以及如何组合linux终端命令.

c linux bash shared-libraries objdump

17
推荐指数
1
解决办法
3万
查看次数

使用bash删除文件行每个开头的空格

如何使用bash删除每行文件中的空格,例如file1.txt.之前:

  gg g
 gg g
t  ttt
Run Code Online (Sandbox Code Playgroud)

后:

gg g
gg g
t  ttt
Run Code Online (Sandbox Code Playgroud)

linux bash whitespace

14
推荐指数
2
解决办法
6万
查看次数

编译错误:在kubuntu linux中找不到-lGLU和-lGL

我在kubuntu linux 11.10中编译"hello world"应用程序时遇到了一些问题.这是项目文件:

// opengltext.pro
SOURCES += \
    main.cpp
QT += opengl
Run Code Online (Sandbox Code Playgroud)

还有一个cpp文件:

    // main.cpp

    #include <QApplication>

    int main( int argc, char *argv[] )
    {
        QApplication app( argc, argv );
        return app.exec();
    }
Run Code Online (Sandbox Code Playgroud)

我有以下错误:

:-1: error: cannot find -lGLU
:-1: error: cannot find -lGL
:-1: error: collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

我尝试在谷歌找到这个问题的解决方案.但没有找到.我尝试安装:

sudo apt-get install libglw1-mesa-dev
Run Code Online (Sandbox Code Playgroud)

但这个错误仍在发生

有什么问题?

c++ linux opengl qt kubuntu

12
推荐指数
1
解决办法
1万
查看次数

我如何从源代码静态构建GDB?

我下载了gdb-6.5.bz2.tar.解开这个文件.我写道:LDFLAGS = -static ./configure

但结果我得到一个gdb,需要一个so文件,例如:ncurses.so.5 libc.so.0等

我怎么能静态建造?

c linux gcc gdb

10
推荐指数
3
解决办法
9629
查看次数

我如何使用SendInput在x,y坐标上模拟双击鼠标(i khow handle)?

我如何使用SendInput在x,y坐标上模拟双击鼠标(我知道这个窗口的句柄)?

c++ windows mouse winapi mouseevent

9
推荐指数
1
解决办法
1万
查看次数

在Ubuntu 11.10中安装所有OpenGL库以进行开发

我刚刚安装了ubuntu 11.10.

我按照这个问题的第一个答案.我安装了:freeglut3 freeglut3-dev

igor@ubuntu:~$ sudo apt-get install freeglut3
[sudo] password for igor: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  freeglut3
0 upgraded, 1 newly installed, 0 to remove and 253 not upgraded.
Need to get 77.5 kB of archives.
After this operation, 315 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/main freeglut3 i386 2.6.0-1ubuntu2 [77.5 kB]
Fetched 77.5 kB in 0s (82.9 kB/s) …
Run Code Online (Sandbox Code Playgroud)

c c++ opengl ubuntu glew

9
推荐指数
1
解决办法
4万
查看次数

标签 统计

c++ ×6

linux ×5

c ×3

opengl ×3

bash ×2

ubuntu ×2

windows ×2

gcc ×1

gdb ×1

glew ×1

glu ×1

glut ×1

kubuntu ×1

list ×1

memory-leaks ×1

mouse ×1

mouseevent ×1

objdump ×1

python ×1

qt ×1

shared-libraries ×1

stl ×1

whitespace ×1

winapi ×1

windows-7 ×1