English 中文(简体)
在 c++ 中用日食获取错误错误的 bin shash 权限被拒绝
原标题:simple hello world in c++ using eclipse getting error bin bash permission denied

我在C++中编程的一个项目上工作, 不要问为什么,我必须研究Linux。

我安装了日食3.7.2 我猜是最新版本的

以我的无知,当我意识到自己甚至无法编译时,我就开始了这个项目的工作。 于是我开始用一个简单的打招呼世界来观察情况。 创建了新的项目,完成了,新的源文件 cpp,完成了,编码了一个打招呼的世界,完成了。

#include <iostream>

using namespace std;

int main() {

cout << "hello world :( ....." << endl;
return 0;

}

这是代码。 然而当它编译后我运行它时, 我得到这个错误:

/bin/bash: /media/....../myprojectname: Permission denied
/bin/bash: line 0: exec: /media/....../myprojectname/Debug/myprojectname: cannot execute: Permission denied

我已经研究过这个问题了, 但我并不真正有经验, 更像是大学知识, 但我读到的关于它的所有线索都建议试着用制作文件来编集(我对此一无所知,

我从未在日食上为窗户做这件事上遇到过问题,这是我第一次尝试Linux。我读过,这似乎与Linux的许可有关,但又不是我最大的力量。

我猜我的问题是 我如何用C++ 和日食编辑器 来编码一个简单的哈罗世界 然后让程序运行

提前感谢!

问题回答

嗨,我也有同样的问题, 但是在我的案例中,我安装了有窗户的乌本图。

我的问题是 包含日食工作空间的驱动器 给了我一个被拒绝的许可

这是因为它是一个NTFS驱动器。

我把它转换为电话分机3... 以后,如果你愿意,可以把它从电话分机3转换为电话分机4

步骤:

  1. 检查驱动器的完整具体名称 :

    /dev/sd7> 我驾驶105GB

  2. 更改文件系统系统 & amp; 驱动器标签 :

    (批量标签使用-L)

  3. [可选] 将其转换为 tune2fs 的 ext4 。

我希望这有帮助:)





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?