由买买提看人间百态

topics

全部话题 - 话题: char
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
h********5
发帖数: 276
1
题目如下,问输出是什么
int i[] = {'a', 'b', '\0'};
printf("%s",(char *)i);
打印出ab?
%s打印pointer我觉得好像根本不能打印啊,是个地址出来的是乱码吧。。。
搞不清楚
g*****a
发帖数: 1457
2
来自主题: Stock版 - d2中的两个char (转载)
【 以下文字转载自 Game 讨论区 】
发信人: graytea (graytea), 信区: Game
标 题: d2中的两个char
发信站: BBS 未名空间站 (Sat Jul 31 00:11:39 2010, 美东)
狮子吼,碎钢手,旋风血舞剑疾走,狂战士,双手式,剑如流光,人如坚钢
武神现,天地变,纵横江湖多重箭,冷风吹,箭雨飞,泰坦一怒,电光千柱
f****a
发帖数: 4708
3
来自主题: WmGame版 - creating PVP char
it's pity that each account can only create 4 characters, which includes
the PvP character.
And for PvP charactor, you have to use the PvE character to unlock
certain items and skills. So this means I have to use PvE char, then
delete them, create PvP, then fight.
f****a
发帖数: 4708
4
来自主题: WmGame版 - creating PVP char
I don't know. Why GW has that PvP char option then?
st
发帖数: 1685
5
来自主题: WmGame版 - creating PVP char
no idea, maybe some one just wants to start PvP quickly? hmm, what's with
the PvP char? without unlocked stuff, they are not that useful, right?
m**3
发帖数: 2061
6
来自主题: Exchange版 - [转] AF short celeste color char size 2
#1 从版上一个妹妹那里来的。 时尚梦芭莎(?),nwt, s. 太仙了。从没穿过。二十
刀出头来的。 16刀包邮出了。
#2 AF short CELESTE CHAR, size2 , NWT. 20刀+tax。23刀包邮了。
还有 AF stacy xs 的sweater, cream, nwt, $24+tax+shipping
AF MEN HODDIE, ALLEN BROOK(?) SIZE S, HEATHER GRAY $18+TAX+SHIPPING。退前吆
喝下。
g****t
发帖数: 31659
7
【 以下文字转载自 EE 讨论区 】
发信人: guvest (我爱你老婆Anna), 信区: EE
标 题: local = (char *(*)()) inc_1; 是啥意思?
发信站: BBS 未名空间站 (Thu Jul 15 22:18:06 2010, 美东)
发信人: platinumegg (蛋,纯铂金的), 信区: Military
标 题: Re: 岳东晓知识产权案获胜
发信站: BBS 未名空间站 (Thu Jul 15 16:20:11 2010, 美东)
hahaha, see the link below for how it was discussed by people.
http://www.worldlawdirect.com/forum/copyright-trademark-patent/38860-fenwick-west-llp-loses-copyright-jury-trial.html
"Wonder how many millions Chordiant spent on Fenwick & West LLP to get thi
l******e
发帖数: 358
8
来自主题: Database版 - why I cann't get some char variable?
when I do
select $ $ $ from
go
if $ is a char, sometimes I can't get it out? why?
r*******n
发帖数: 3020
9
非静态的,
如果
char* p= "abc",是放到静态区。
r*******n
发帖数: 3020
10
char a[]="abc"
是字符数组 "abc\0"
如果“abc”是放在静态去,
那是不可以修改的,比如不能改成“acc”
f*****Q
发帖数: 1912
11
出个连线题,看看楼主能作对不?
A: static int i;
B: int * i = malloc(sizeof(int));
C: char [] i = "i";
D: int function(){int i; return 0;}
a: heap
b: data
c: stack
d: BSS
i**p
发帖数: 902
12
I know SD Card is used as a block device. Is it possible to create a char
device driver on it?
k**d
发帖数: 80
13
char[] getBuffer() ?
q*****g
发帖数: 72
14
来自主题: Programming版 - for conversion from string to char*
there is one way:
contrcut a vector from string,
then pass address of first element of vector:
string s("hello world");

vector v(s.begin(),s.end());

dosomething(&v[0], v.size());
c*****e
发帖数: 11
15
来自主题: Programming版 - for conversion from string to char*
1:another approach is data(), which return a memory block without '\0',
usually used in some cases requiring high efficiency, since c_str() is just
terminate()+data().
2:be careful with c_str() in some cases.
3:the vector is a kind of copy, which should be safer to some extent.
4:since c_str() return a reference pointer to the content of the string, you
'd better not change the content by c_str() and not save c_str() and use it
again. besides, due to different implementation of string, may
c***k
发帖数: 1589
16
来自主题: Programming版 - 如何把一个char转换成一个int啊?
'5'这样的单个char如何最简便的转换成int啊?
c***k
发帖数: 1589
17
来自主题: Programming版 - 如何把一个char转换成一个int啊?
这个是string啊,比如我有一个非常大的数字,10^1000,我用一个array来记录,有没
有简便的方法,直接把某位的数字换成int?还是我要手动把char取出给他加个null
terminal,然后再用atoi?
z****u
发帖数: 23
18
来自主题: Programming版 - How to char <--> int in Matlab?
I found them.
char(65)='A'
double('A')=65
Thanks anyway.
T*****9
发帖数: 2484
19
来自主题: Programming版 - 问个char*的问题
你char *c = "fuck the world."; cout << c << endl;输出的只怕也是整个array:
fuck the world.吧
m*******o
发帖数: 264
20
来自主题: Programming版 - 问个char*的问题
恩,我就是不太明白有关char* fun(){....} 的函数,这种函数的返回类型应该怎么写
才合适?
返回一个地址还是返回一个指针
s******e
发帖数: 431
21
来自主题: Programming版 - how can I convert CString to char*?
I guess your project was set to UNICODE. You should use TCHAR instead of
char.
y**b
发帖数: 10166
22
来自主题: Programming版 - java里面一个String对象的value是char[0]
Eclipse debug模式显示为char[0], 是什么意思?
测试语句显示 != null.
e****d
发帖数: 333
23
来自主题: Programming版 - typedef basic_string string;
切!
还小看人了?
等我学会了,看你还废话。
别的不说,你帮我找到 typedef basic_string string;并能解释给我,string
是怎么定义的,才能先证明你自己。
在 netghost (Up to Isomorphism) 的大作中提到: 】
m*****m
发帖数: 242
24
来自主题: Programming版 - typedef basic_string string;
get below by google, is it what you say?
Although we usually treat the C++ string as a class, this is really not the
case. The string type is a specialization of a more general constituent, the
basic_string< > template. Observe how string is declared in the Standard C+
+ header file:[38]
typedef basic_string string;
To understand the nature of the string class, look at the basic_string< >
template:
template,
class allocator = allocator
l*******r
发帖数: 511
25
来自主题: Programming版 - typedef const char *month Table[3]
是哪个的长度啊?可以这样写的吗?
monthtable == 指向长度为3的const char array的pointer?
X****r
发帖数: 3557
26
来自主题: Programming版 - typedef const char *month Table[3]
[]比*优先级更高,所以要这么看:
monthTable[3] => monthTable是一个长度为三的数组
*monthTable[3] => 这个数组的每个元素都是一个指针
const char *monthTable[3] => 这些指针指向不可变的字符
所以monthTable就是一个长度为三的不可变字符指针数组
l*******r
发帖数: 511
27
来自主题: Programming版 - typedef const char *month Table[3]
所以我可以
monthtable t1={"January","Feb","Mar"};?
但是一般不是typedef A B;然后B就相当于A的type吗?

[]比*优先级更高,所以要这么看:
monthTable[3] => monthTable是一个长度为三的数组
*monthTable[3] => 这个数组的每个元素都是一个指针
const char *monthTable[3] => 这些指针指向不可变的字符
所以monthTable就是一个长度为三的不可变字符指针数组
t******r
发帖数: 88
28
来自主题: Programming版 - 怎么得到char *分配空间的大小?
char src[]是在栈上的
你这个问题,你把src-4打出来看看,就会发现是个比MAX大一点点的数
s*******e
发帖数: 27
29
来自主题: Programming版 - A question about cost char*
It causes runtime exception (access violation) if you run the following code.
Complier is not able to detect such error since it is very difficult to do
such deduction without const pointer. It could theretically detect it but
require much more work to cover all the cases or all the pointer
manipulations, I think.

char* str = "this is a test. \n";
str[1] = 'g';
r*********r
发帖数: 3195
30
来自主题: Programming版 - 在帮忙看看这个吧 C: int->char*
看看 operator<<(ostream&, char ) 的定义.
f********f
发帖数: 475
31
来自主题: Programming版 - 怎样将array^转换成string?
想将array的每个item从unsigned char变成Hex, 然后concatenate一起变成string.怎
么做呢? 谢谢!
z****e
发帖数: 2024
32
来自主题: Programming版 - 怎样将array^转换成string?
unsigned char a[ ]="asfsadfs";
string s(a,a+sizeof a/sizeof *a);
f********f
发帖数: 475
33
来自主题: Programming版 - 怎样将array^转换成string?
我的unsigned char Data不是ASCII code, 比如说:
{0x01, 0x11,0x02, 0x00, 0x12, 0x34, 0x56 ....}
我想将其中的0x12, 0x34, 0x56 显示成123456在GUI上.
U********d
发帖数: 577
34
来自主题: Programming版 - 问个char * 的问题
如果没有上下文光秃秃给你两个char*那就真的没有办法了,typeid什么的都没有办法
。不过你可以考虑try catch来测试一下,如果实在有必要的话。
还有一种杀鸡用牛刀的方法是取一下指向地址的内存属性。
z****e
发帖数: 2024
35
来自主题: Programming版 - 问个char * 的问题
赞。

char
据。
h*******c
发帖数: 248
36
来自主题: Programming版 - 问个char * 的问题
这个专业。我的粗浅理解是,没分配内存的指针不能乱用。

char
据。
s*****w
发帖数: 1527
37
LPCWSTR using printf %ls, only comes back with 1st char,
not the whole string, so what's the correct way pls ?
m******t
发帖数: 4077
38
来自主题: Programming版 - "(char *)-1" 是什么意思?
今天看到这么一段code,请问这个是什么意思? 把“-1”强制转化成char 型指针?
地址不都是应该unsigned吗?
m****s
发帖数: 1481
39
static const char* const grades[]={"A","B","C","D","Fail"};
比较糊涂,这里两个const分别定义什么东西是constant呢?谢谢
m*m
发帖数: 47
40
grades 是个const pointer 所指向的是个const char*. 从右往左读就好理解了。
m****s
发帖数: 1481
41
顺便再问下,按照从右往左读,这里这个static是指const char* 是静态的?也就是那
些字符串只初始化一次就不再变了。但是如果这一句是在一个function里,每次call这
个function,letters array里面存的地址还是重新从那些字符串那里初始化一次?
I****e
发帖数: 9
42
来自主题: Computation版 - c++一个定义 char 的问题
unsigned char base:4, record:8 ;
这是什么意思啊?没见过这。谢谢
j***i
发帖数: 1278
43
cast to function point return a char *

this
$
18m.
c**********e
发帖数: 2007
44
The char variable has format 02/06/1985.
I tried to use
newdate=input(olddate,date10.);
but does not work. Anybody has any idea? Thank you.
G**S
发帖数: 1108
45

The char variable has format 02/06/1985.
I tried to use
newdate=input(olddate,date10.);
input(olddate,mmddyy10.);
but does not work. Anybody has any idea? Thank you.
w***y
发帖数: 114
46
来自主题: Statistics版 - help how to convert char to numeric variable?
my data:
weight height
126.1 165.5
135.3 170
162.8 145
145.3 178.5
they are char type variables with length $200. How to convert them into
numeric variable?
I use
wt=input(weight,5.1);
ht=input(height,5.1);
but it doesnot work. thanks
B********9
发帖数: 44
47
Hey, please help! Thanks in advance!
I have a character date eg: 30SEP2011:10:12:31:705. I need read this char.
date to numeric, format as datetime22.3. What function I can use it?
I know there is a function called DHMS, but only read till HH:DD:SS level,
not to HH:DD:SS:SSS.
I'm waiting on-line to see if anyone know the answer.Thanks for your kindly
helps.
t**s
发帖数: 156
48
如果知道有多少variable需要转换,也可以用下面的方法.
假定有100个variable
Data test1;
Set test;
Array allchar(*) _char_;
Array newvar(*) newvar1 - newvar100;
Do i=1 to dim(allchar);
newvar(i)=Input(allchar(i), best.);
End;
Run;
如果不知道, 先找出来
proc sql noprint;
select count(*) into:cnt from sashelp.vcolumn
where libname="WORK" and upcase(memname)="TEST" and upcase(type=)"CHAR";
quit;
Data test1;
Set test;
Array allchar(*) _char_;
Array newvar(*) newvar1 - newvar&cnt;
... 阅读全帖
s*******2
发帖数: 499
49
我常用的方法是,建一个array,包括所有char variable,然后一步就可以全改成
numeric了。
p***r
发帖数: 920
50
i like more brutal one
transpose wide -> long
all variable char -> numeric
transpose long -> wide
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)