在编写代码时,遇到 在原来的代码中出现这个问题 原来的代码: //3 计算排序时间 template<typename T> void testSort(string sortName, void(* sort) (T [],int ),T arr[],int n){ clock_t startTime = clock(); sort(arr,n); clock_t endTime = clock(); assert(isSort(arr,n)); cout<<sortName&l…
将低版本gcc编译过的程序移植到高版本GCC时, 可能会出现一些兼容性问题. 原因是, 为了适应新的标准,一些旧的语法规则被废弃了. 关于这方面的一些具体资料可从该处查询. 这里只是自己遇到的其中一个问题. 错误提示: In instantiation of ‘int t(T) [with T = int]’ required from here error: ‘f’ was not declared in this scope, and no declarations were found b…
1.编译种错误提示: arm-none-linux-gnueabi-gcc: directory: No such file or directory arm-none-linux-gnueabi-gcc: directory": No such file or directory <command-line>:0:16: warning: missing terminating " character 解决方案: https://github.com/Pivosgroup…
转自:http://www.cnblogs.com/xilinch/archive/2013/04/02/2996359.html make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1 解决办法:缺少lib32z1-dev,安装即可:apt-get install lib32z1-dev make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_int…
有转载这里的也有添加的. ################# Fix 1 ########################## Error: frameworks/base/include/utils/KeyedVector.h:193:31: note: declarations in dependent base ‘android::KeyedVector<android::String8, android::sp<AaptDir> >’ are not found by un…
转自:http://blog.csdn.net/yiyaaixuexi/article/details/8330645 SEAndroid概述   SEAndroid(Security-Enhanced Android),是将原本运用在Linux操作系统上的MAC强制存取控管套件SELinux,移植到Android平台上.可以用来强化Android操作系统对App的存取控管,建立类似沙箱的执行隔离效果,来确保每一个App之间的独立运作,也因此可以阻止恶意App对系统或其它应用程序的攻击. SEA…
Phases of translation--翻译阶段 The C++ source file is processed by the compiler as if the following phases take place, in this exact order: Phase 1 --96个basic source character set The individual bytes of the source code file are mapped(in implementation…
extraction from The C++ Programming Language, 4th. edition, Bjarne Stroustrup If no initializer is specified, a global, namespace, local static, or static member (collectively called static objects) is initialized to {} of the appropriate type. We cl…
引言: 在iOS开发过程中, 我们可能会碰到一些系统方法弃用, weak.循环引用.不能执行之类的警告. 有代码洁癖的孩子们很想消除他们, 今天就让我们来一次Fuck 警告!! 首先学会基本的语句: #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" 中间这里写出现警告的代码 #pragma clang diagnostic pop 这样就消除了方法弃用的警…
转自:https://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Function-Attributes.html 5.24 Declaring Attributes of Functions In GNU C, you declare certain things about functions called in your program which help the compiler optimize function calls and check your…