.\与..\的区别 “//”与“\\”还有“/”与“\”有什么区别吗?

作者&投稿:驹有 (若有异议请与网页底部的电邮联系)

.\与..\的区别为:表示不同、级别不同、内容不同。

一、表示不同

1、.\:.\表示项目文件所在目录。

2、..\:..\ 表示项目文件所在目录向上一级目录。

二、级别不同

1、.\:.\属于..\的下级目录。

2、..\:..\属于.\的上级目录。

三、内容不同

1、.\:.\目录下可以有子目录,也可以没有子目录。

2、..\:..\目录下一定有子目录。



区别是目录所在层级不一样。

.\:代表目前所在的目录。

..\:代表上一层目录。

两个都表示路径的意思。

1、相对路径-顾名思义,相对路径就是相对于当前文件的路径。网页中一般表示路径使用这个方法。

2、绝对路径-绝对路径就是你的主页上的文件或目录在硬盘上真正的路径。绝对路径就是你的主页上的文件或目录在硬盘上真正的路径。

C/C++ &与&& |与|| 的区别

&&表示逻辑与的意思,即为and。当运算符两边的表达式的结果都为true时,整个运算结果才为true,否则,只要有一方为false,则结果为false。

比如 12&&23的结果就是1,12&&-1 的结果是1,123&&0的结果就是0。

&&还具有短路的功能,即如果第一个表达式为false,则不再计算第二个表达式,例如,对于if(str != null && !str.equals(“”))表达式,当str为null时,后面的表达式不会执行,所以不会出现NullPointerException。

&表示按位与。

&表示按位与操作,我们通常使用0x0f来与一个整数进行&运算,来获取该整数的最低4个bit位,例如,0x31 & 0x0f的结果为0x01。

二进制与运算规则:1&1=1  1&0=0  0&0=0

15&127为什么等于15啊? 

15二进制: (0000 1111)

127二进制: (1111 1111)

按位与自然就是(0000 1111)=15

||表示逻辑或逻辑或,是逻辑运算符,符号是“||”(在PASCAL中为"or")。 “逻辑或”相当于生活中的“或者”,当两个条件中有任一个条件满足,“逻辑或”的运算结果就为“真”。

12||1 =1  12||0 =1 0||0 =0

|表示按位或按位或运算 按位或运算符“|”是双目运算符。其功能是参与运算的两数各对应的二进位(也就是最后一位)相或。只要对应的二个二进位有一个为1时,结果位就为1。

128:     (0001 0000 0000)

127:     (0000 1111 1111) (高位用0补齐)

按位或就是(0001 1111 1111)=255

以上内容参考 百度百科——keil



.\ 表示项目文件所在目录之下的目录。
..\ 表示项目文件所在目录向上一级目录下的目录。
..\..\表示项目文件所在目录向上二级目录之下的目录。

都是针对项目文件所在目录而言,用于定位其它文件的路径位置。

.\ 表示项目文件所在目录
..\ 表示项目文件所在目录向上一级目录
..\..\表示项目文件所在目录向上二级目录
这样说不就行了吗?绕口令绕晕别人?

depending on how you have configured the Keil compiler, the DATA directory is in the location where you have it instructed to be or in Keil default location

Use Settings from TOOLS.INI

Use the default installation path settings as defined in the file TOOLS.INI. If this options is enabled, you can move your project to a different computer where μVision is installed on a different folder.

Tool Base Folder

Specify the path to the currently used toolchain (examples: for MDK-ARM: C: \ Keil \ ARM \; for C51: C: \ Keil \ C51)

BIN

Specify the path to the binary folder of the current toolchain (examples: for MDK-ARM: C: \ Keil \ ARM \ BIN \;; for C51: C: \ Keil \ C51 \ BIN)

INC

Specify the path to the include folder of the current toolchain (examples: for MDK-ARM: C: \ Keil \ ARM \ INC \; for C51: C: \ Keil \ C51 \ INC)

LIB

Specify the path to the library folder of the current toolchain (examples: for MDK-ARM: C: \ Keil \ ARM \ LIB \; for C51: C: \ Keil \ C51 \ LIB)

Regfile

Specify the path to the regfile folder of the current toolchain (examples: for MDK-ARM: C: \ Keil \ ARM \ REG \;; for C51: C: \ Keil \ C51 \ REG)

souces of facts: keil corporation website on UVison version 4

For MDK Version 5.xx and later

Select ARM Development Tools

Use ARM Compiler

ARMCC Folder

Specifies the root folder of the ARMCC compiler tools. Default is tool base folder \ ARMCC \ BIN \.

Examples:

ARMCC Folder:. \ ARMCC \ bin \

This is the default Setting The root is taken from the entry in the field Tool Base Folder..

ARMCC Folder: C: \ Compilers \ ARMCC \ bin \

You CAN enter absolute Paths.

Use GCC

Selects the GNU development tools.

GNU-Tool-Prefix

Specify GNU variants.

GNU-Tool-Folder

Specify the path to the GNU installation folder.

Examples:

For GNU v3.22 with uclib:

GNU-Tool-Prefix: arm-uclibc-

GNU-Tool-Folder: C: \ CodeSourcery \

For GNUARM V4 with Standard Library:

GNU-Tool-Prefix: arm-elf-

GNU-Tool-Folder: C: \ Program Files \ CodeSourcery \ Sourcery G ++ Lite \

For MDK versions prior to version 5.xx

Use RealView

Use RealView compilation tools with μVision.

RealView Folder

The RealView Folder specifies the root folder of the RealView compiler. Default is tool base folder \ ARMCC \ BIN \.

CMSIS Folder

Set the path to the CMSIS environment. Default is tool base folder \ CMSIS \. The default path is not shown.

RTX-ARM Folder

Set the path for the RTX-RTOS. Default is tool base folder \ RV31 \. The default path is not shown.

RL-ARM Folder

Set the path for the RealView library files. Default is tool base folder \ RL \. The default path is not shown.

Use GCC

Selects the GNU development tools.

GNU-Tool-Prefix

Specify GNU variants.

GNU-Tool-Folder

Specify the path to the GNU installation folder.

Examples:

For GNU v3.22 with uclib:

GNU-Tool-Prefix: arm-uclibc-

GNU-Tool-Folder: C: \ CodeSourcery \

For GNUARM V4 with Standard Library:

GNU-Tool-Prefix: arm-elf-

GNU-Tool-Folder: C: \ Program Files \ CodeSourcery \ Sourcery G ++ Lite \

Note

The options depend on the toolchain in use.

. Is the directory in which you are now
.. Is one level closer to the root
... Is root itself
example

C: \ Keil \ ARM \ INC \ if i have include file located here,
./junk.txt is file in same directory; C: \ Keil \ ARM \ INC \file.txt
../junk.txt is file one diectory closet to root at: C: \ Keil \ ARM \ INC \ file.txt
... / junk.txt is file on root of the drive C: \ junk.txt

\与/的区别~

本地的文件,都是有路径的。这个时候你看看它的路径,你可以发现,是用“\”的,意思就是,本地路径表示用“\”表示母文件夹与子文件夹的层次关系。
而“/”则是表示非本地的路径分隔。如一个网站:http://z.baidu.com/question/107203929.html,里面的“/”则用来分隔网站的主机服务器等信息。
所以“\”“/”的区别其实在与区别本地与非本地。