Discussion:
コンパイルが通らない
(too old to reply)
sunao furukawa
2009-03-18 02:24:59 UTC
Permalink
$B!!***@n$H?=$7$^$9!#(B
$B!!0J2<$N$h$&$J%W%m%0%i%`$r(BVisual C++ 2008 express edition$B$G%3%s%Q%$%k$7$h$&$H$7$F$$$k$N$G$9$,!"%G%P%C%0$NCJ3,$GCfCG$7$F$$$^$9!#$$$m$$$m$d$C$F$_$?$N$G$9$,860xITL@$N%G%P%C%0$NCfCG$K$J$C$F$7$^$&$3$H$b$"$j$^$7$?!#FC$K(Bmain$B$NCJ3,$G$N>e<j$J%W%m%0%i%`$N=q$-J}$r65$($F$/$@$5$$!#(B

$B!c=PNO!d(B
------ $B%S%k%I3+;O(B: $B%W%m%8%'%/%H(B: h17spring001, $B9=@.(B: Debug Win32 ------
$B%3%s%Q%$%k$7$F$$$^$9(B...
h17spring001.cpp
.\h17spring001.cpp(45) : error C2664: 'print_string' : 3 $BHVL\$N0z?t$r(B
'CHARPROF **' $B$+$i(B 'CHARPROF *' $B$KJQ49$G$-$^$;$s!#(B($B?7$7$$5!G=(B ; $B%X%k%W$r;2>H(B)

$B;X<($5$l$?7?$O4XO"$,$"$j$^$;$s!#JQ49$K$O(B reinterpret_cast$B!"(BC $B%9%?%$%k(B
$B%-%c%9%H$^$?$O4X?t%9%?%$%k$N%-%c%9%H$,I,MW$G$9!#(B
$B%S%k%I%m%0$O(B "file://c:\Users\sunao\Documents\Visual Studio
2008\Projects\h17spring001\h17spring001\Debug\BuildLog.htm" $B$KJ]B8$5$l$^$7$?!#(B

h17spring001 - $B%(%i!<(B 1$B!"7Y9p(B 0
========== $B%S%k%I(B: 0 $***@5>o=*N;!"(B1 $B<:GT!"(B0 $B99?7ITMW!"(B0 $B%9%-%C%W(B ==========


$B!c%W%m%0%i%`!d(B
// h17spring001.cpp : $B%a%$%s(B $B%W%m%8%'%/%H(B $B%U%!%$%k$G$9!#(B

#include "stdafx.h"
#include <stdio.h>
using namespace System;
typedef struct{ char char_p;
int char_w;
} CHARPROF;
void print_string(int,char *[],CHARPROF *,int);
int word_width(char *,CHARPROF *);

void print_string(int line_w, char *str_list[], CHARPROF *char_list, int
space_w){
int cur_w = 0, str_w , idx;
for(idx = 0; str_list[idx] != NULL; idx++){
str_w = word_width(str_list[idx],char_list);
cur_w += str_w;
if(cur_w == str_w)
printf("%s", str_list[idx]);
else{
cur_w += space_w;
if(cur_w <= line_w)
printf(" %s",str_list[idx]);
else{
cur_w = str_w;
printf("\n%s",str_list[idx]);
}
}
}
putchar('\n');
}
int word_width(char *str, CHARPROF *char_list){
int print_w = 0,idx;
while(*str !='\0'){
for(idx = 0; *str != char_list[idx].char_p; idx++);
print_w += char_list[idx].char_w;
str++;
}
return print_w;
}

int main(void)
{
CHARPROF *test0001;
char *z[10]={"Hello World"};
print_string(80,z,&test0001,1);
}
ちゅ
2009-03-18 06:22:24 UTC
Permalink
$B$A$e(B $B$G$9!#(B

On Wed, 18 Mar 2009 11:24:59 +0900
$B%3%s%Q%$%k$,DL$i$J$$(B
int main(void)
{
CHARPROF *test0001;
char *z[10]={"Hello World"};
print_string(80,z,&test0001,1);
}
CHARPROF *test0001;
print_string(80,z,&test0001,1);
$B%]%$%s%?!<$N%"%I%l%9$rEO$7$F$^$9$M!#(B

$B$=$NB>$N4X?t$NFbMF$O8+$F$$$J$$$N$G!D!#(B
--
$B$A$e(B
sunao furukawa
2009-03-18 07:24:38 UTC
Permalink
Post by ちゅ
$B$A$e(B $B$G$9!#(B
On Wed, 18 Mar 2009 11:24:59 +0900
$B%3%s%Q%$%k$,DL$i$J$$(B
int main(void)
{
CHARPROF *test0001;
char *z[10]={"Hello World"};
print_string(80,z,&test0001,1);
}
CHARPROF *test0001;
print_string(80,z,&test0001,1);
$B%]%$%s%?!<$N%"%I%l%9$rEO$7$F$^$9$M!#(B
$B$=$NB>$N4X?t$NFbMF$O8+$F$$$J$$$N$G!D!#(B
--
$B$A$e(B
$B$A$e$5$s!"AaB.$N%l%9$"$j$,$H$&$4$6$$$^$7$?!#(B
main$B$N$H$3$m$G$9$,$b$H$b$H:G=i$K=q$$$?$N$O<!$N$h$&$J%W%m%0%i%`$G$9!#(B

int main(void)
{
print_string(80, "Hello World",char_list,1);
}

$B!c=PNO!d(B
------ $B%S%k%I3+;O(B: $B%W%m%8%'%/%H(B: h17spring001, $B9=@.(B: Debug Win32 ------
$B%3%s%Q%$%k$7$F$$$^$9(B...
h17spring001.cpp
.\h17spring001.cpp(43) : error C2065: 'char_list' : $BDj5A$5$l$F$$$J$$<1JL;R$G$9!#(B

$B%S%k%I%m%0$O(B "file://c:\Users\sunao\Documents\Visual Studio
2008\Projects\h17spring001\h17spring001\Debug\BuildLog.htm" $B$KJ]B8$5$l$^$7$?!#(B

h17spring001 - $B%(%i!<(B 1$B!"7Y9p(B 0
========== $B%S%k%I(B: 0 $***@5>o=*N;!"(B1 $B<:GT!"(B0 $B99?7ITMW!"(B0 $B%9%-%C%W(B ==========

$B$H$$$&$o$1$G!"(Bchar_list$B$NDj5A$N;EJ}$,$o$+$j$^$;$s!"$I$J$?$+$$$$Nc$r65$($F$/$@$5$$!#(B
ちゅ
2009-03-18 07:52:57 UTC
Permalink
$B$A$e(B $B$G$9!#(B

On Wed, 18 Mar 2009 16:24:38 +0900
Re: $B%3%s%Q%$%k$,DL$i$J$$(B
.\h17spring001.cpp(43) : error C2065: 'char_list' : $BDj5A$5$l$F$$$J$$<1JL;R$G$9!#(B
$BDj5A$5$l$F$$$J$$<1JL;R(B $B$J$N$G(B

CHARPROF char_list; // $B<BBN$rDj5A(B

$B!!(B// char_list $B$N%]%$%s%?!<(B($B%"%I%l%9(B)$B$rEO$9(B
$B!!(Bprint_string(80, "Hello World", &char_list,1);

$B!!$=$NB>$N4X?t$NFbMF$O8+$F$$$J$$$N$G!D!#(B
$B!!(BC++$BF~Lg(B
$B!!(Bhttp://www.asahi-net.or.jp/~yf8k-kbys/newcpp0.html
$B!!0lEY!"FI$^$l$F8+$F$/$@$5$$!#!!(B
--
$B$A$e(B
sunao furukawa
2009-03-19 01:24:36 UTC
Permalink
Post by ちゅ
$B$A$e(B $B$G$9!#(B
Post by sunao furukawa
.\h17spring001.cpp(43) : error C2065: 'char_list' : $BDj5A$5$l$F$$$J$$<1JL;R$G$9!#(B
$BDj5A$5$l$F$$$J$$<1JL;R(B $B$J$N$G(B
CHARPROF char_list; // $B<BBN$rDj5A(B
$B!!(B// char_list $B$N%]%$%s%?!<(B($B%"%I%l%9(B)$B$rEO$9(B
$B!!(Bprint_string(80, "Hello World", &char_list,1);
$BAaB.<!$N$h$&$K%W%m%0%i%`$rJQ99$7$F%G%P%C%0$r<B9T$7$F$_$^$7$?$,!&!&!&!#(B
$B!c%W%m%0%i%`!d(B
// h17spring001.cpp : $B%a%$%s(B $B%W%m%8%'%/%H(B $B%U%!%$%k$G$9!#(B

#include "stdafx.h"
#include <stdio.h>
using namespace System;
typedef struct{ char char_p;
int char_w;
} CHARPROF;
void print_string(int,char *[],CHARPROF *,int);
int word_width(char *,CHARPROF *);

void print_string(int line_w, char *str_list[], CHARPROF *char_list, int
space_w){
int cur_w = 0, str_w , idx;
for(idx = 0; str_list[idx] != NULL; idx++){
str_w = word_width(str_list[idx],char_list);
cur_w += str_w;
if(cur_w == str_w)
printf("%s", str_list[idx]);
else{
cur_w += space_w;
if(cur_w <= line_w)
printf(" %s",str_list[idx]);
else{
cur_w = str_w;
printf("\n%s",str_list[idx]);
}
}
}
putchar('\n');
}
int word_width(char *str, CHARPROF *char_list){
int print_w = 0,idx;
while(*str !='\0'){
for(idx = 0; (*str)!= char_list[idx].char_p; idx++);
print_w += char_list[idx].char_w;
str++;
}
return print_w;
}

int main(void)
{
CHARPROF test0001;
char *z[10]={"$B$3$N9-$$Ln86$$$C$Q$$:i$/2V$r$R$H$D;D$i$:$"$J$?$K$"$2$k(B"};
print_string(80,z,&test0001,1);
}

$B!c=PNO!d(B
'h17spring001.exe': 'C:\Users\sunao\Documents\Visual Studio
2008\Projects\h17spring001\Debug\h17spring001.exe' $B$rFI$_9~$_$^$7$?!#%7%s%\%k$,FI$_9~$^$l$^$7$?!#(B
'h17spring001.exe': 'C:\Windows\System32\ntdll.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\mscoree.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\kernel32.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe':
'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcr90d.dll'
$B$rFI$_9~$_$^$7$?(B
'h17spring001.exe':
'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcm90d.dll'
$B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\ole32.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\msvcrt.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\gdi32.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\user32.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\advapi32.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\rpcrt4.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\imm32.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\msctf.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\lpk.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\usp10.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\shlwapi.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe':
'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6000.16386_none_5d07289e07e1d100\comctl32.dll'
$B$rFI$_9~$_$^$7$?(B
'h17spring001.exe':
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll' $B$rFI$_9~$_$^$7$?(B

'h17spring001.exe':
'C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.3053_none_d08d7bba442a9b36\msvcr80.dll'
$B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\shell32.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe':
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Culture.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe':
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\Culture.dll' $B$r%"%s%m!<%I(B
'h17spring001.exe':
'C:\Windows\assembly\NativeImages_v2.0.50727_32\mscorlib\c068708e16abf0be77a21b9f29817d83\mscorlib.ni.dll'
$B$rFI$_9~$_$^$7$?(B
'h17spring001.exe' ($B%^%M!<%87?(B):
'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
$B$,FI$_9~$^$l$^$7$?(B
'h17spring001.exe': 'ImageAtBase0x6f5b0000' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'ImageAtBase0xd20000' $B$rFI$_9~$_$^$7$?!#%7%s%\%k$,FI$_9~$^$l$F$$$^$;$s!#(B
'h17spring001.exe': 'ImageAtBase0x6f5b0000' $B$r%"%s%m!<%I(B
'h17spring001.exe':
'C:\Windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_ja_b77a5c561934e089\mscorlib.resources.dll'
$B$rFI$_9~$_$^$7$?!#%P%$%J%j$O%G%P%C%0>pJs$H0l=o$K%S%k%I$5$l$^$;$s$G$7$?!#(B
'h17spring001.exe' ($B%^%M!<%87?(B):
'C:\Windows\assembly\GAC_MSIL\mscorlib.resources\2.0.0.0_ja_b77a5c561934e089\mscorlib.resources.dll'
$B$,FI$_9~$^$l$^$7$?(B
'h17spring001.exe' ($B%^%M!<%87?(B): 'c:\Users\sunao\Documents\Visual Studio
2008\Projects\h17spring001\Debug\h17spring001.exe' $B$,FI$_9~$^$l$^$7$?!#%7%s%\%k$,FI$_9~$^$l$^$7$?!#(B
'h17spring001.exe':
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll' $B$rFI$_9~$_$^$7$?(B

'h17spring001.exe':
'C:\Windows\Microsoft.NET\Framework\v2.0.50727\diasymreader.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe': 'C:\Windows\System32\rsaenh.dll' $B$rFI$_9~$_$^$7$?(B
'h17spring001.exe' ($B%^%M!<%87?(B):
'C:\Windows\WinSxS\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcm90d.dll'
$B$,FI$_9~$^$l$^$7$?(B
'h17spring001.exe':
'C:\Windows\assembly\NativeImages_v2.0.50727_32\System\57ac9ba5419d6bf4b79f2979b0755428\System.ni.dll'
$B$rFI$_9~$_$^$7$?(B
'h17spring001.exe' ($B%^%M!<%87?(B):
'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
$B$,FI$_9~$^$l$^$7$?(B
'System.AccessViolationException' $B$N=i2sNc30$,(B h17spring001.exe $B$GH/@8$7$^$7$?!#(B

'System.AccessViolationException' $B$N%O%s%I%k$5$l$F$$$J$$Nc30$,(B
h17spring001.exe $B$GH/@8$7$^$7$?!#(B

$BDI2C>pJs(B: $BJ]8n$5$l$F$$$k%a%b%j$KFI$_<h$j$^$?$O=q$-9~$_A`:n$r9T$*$&$H$7$^$7$?!#B>$N%a%b%j$,2u$l$F$$$k$3$H$,9M$($i$l$^$9!#(B

$B!cCfCG$7$^$7$?!d(B
$B$H$$$&=PNO$,=P$F;_$^$C$F$7$^$$$^$9!#%+!<%=%k$O!"#3#49TL\$N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$NG[Ns$r0z?t$K$7$?4X?t$r(Bmain$B$NCf$G<B9T$9$k%W%m%0%i%`$r=q$$$?=***@R$O=j;}$7$F$$$k?t:}$N(BC$B$*$h$S(BC++$B$NK\$NCf$K$O$"$j$^$;$s$G$7$?!#(B
$B!!;d$,=q$$$?%W%m%0%i%`$NCf$G$3$l$G$@$a$JM}M3$N$o$+$i$J$$$b$N$,$"$j$^$9!#$I$&$7$F$b(B'print_string'$B$N(B2$BHVL\$N0z?t$r(B 'char *' $B$+$i(B 'char *[]' $B$KJQ49$G$-$^$;$s!#(B
$B!!$"$H!">/$75$$K$J$C$?$3$H$J$N$G$9$,!"9=B$BN$NJQ?t$N=i4|2=$r$9$k$H%(%i!<$K$J$j$^$9!##z$NG[Ns$K$D$$$F$b=i4|2=$r$7$h$&$H$9$k$H%(%i!<$K$J$j$^$9!#(Bscanf$B$r;H$&5$$O$J$$$N$GJ8;zNs$b$7$/$ODj?t$G=i4|2=$7$?$$$G$9!#$G$J$$$H%]%$%s%?$,$I$3$r;XDj$9$k$+$o$+$i$:$3$NA0$N$h$&$J860xITL@$N%(%i!<!J%W%m%0%i%`$NK=Av!K$K$J$k$H;W$$$^$9!#(B
$B!!$G$O%W%m%0%i%`$r0J2<$K<($7$^$9!#(B
// h17spring001.cpp : $B%a%$%s(B $B%W%m%8%'%/%H(B $B%U%!%$%k$G$9!#(B

#include "stdafx.h"
#include <stdio.h>
using namespace System;
typedef struct{ char char_p;
int char_w;
} CHARPROF;
void print_string(int,char *[],CHARPROF *,int);
int word_width(char *,CHARPROF *);

void print_string(int line_w, char *str_list[], CHARPROF *char_list, int
space_w){
int cur_w = 0, str_w , idx;
for(idx = 0; str_list[idx] != NULL; idx++){
str_w = word_width(str_list[idx],char_list);
cur_w += str_w;
if(cur_w == str_w)
printf("%s", str_list[idx]);
else{
cur_w += space_w;
if(cur_w <= line_w)
printf(" %s",str_list[idx]);
else{
cur_w = str_w;
printf("\n%s",str_list[idx]);
}
}
}
putchar('\n');
}
int word_width(char *str, CHARPROF *char_list){
int print_w = 0,idx;
while(*str !='\0'){
for(idx = 0; (*str)!= char_list[idx].char_p; idx++);
print_w += char_list[idx].char_w;
str++;
}
return print_w;
}

int main(void)
{
CHARPROF test0001;
char z[12]="Hello world";
print_string(80,&z[0],&test0001,1);
}

$B!c=PNO!d(B
------ $B%S%k%I3+;O(B: $B%W%m%8%'%/%H(B: h17spring001, $B9=@.(B: Debug Win32 ------
$B%3%s%Q%$%k$7$F$$$^$9(B...
h17spring001.cpp
.\h17spring001.cpp(45) : error C2664: 'print_string' : 2 $BHVL\$N0z?t$r(B 'char
*' $B$+$i(B 'char *[]' $B$KJQ49$G$-$^$;$s!#(B($B?7$7$$5!G=(B ; $B%X%k%W$r;2>H(B)
$B;X<($5$l$?7?$O4XO"$,$"$j$^$;$s!#JQ49$K$O(B reinterpret_cast$B!"(BC $B%9%?%$%k(B
$B%-%c%9%H$^$?$O4X?t%9%?%$%k$N%-%c%9%H$,I,MW$G$9!#(B
$B%S%k%I%m%0$O(B "file://c:\Users\sunao\Documents\Visual Studio
2008\Projects\h17spring001\h17spring001\Debug\BuildLog.htm" $B$KJ]B8$5$l$^$7$?!#(B

h17spring001 - $B%(%i!<(B 1$B!"7Y9p(B 0
========== $B%S%k%I(B: 0 $***@5>o=*N;!"(B1 $B<:GT!"(B0 $B99?7ITMW!"(B0 $B%9%-%C%W(B ==========
やま
2009-03-22 16:49:21 UTC
Permalink
$B$d$^$G$9!#(B

http://$B>pJs=hM};n83(B.jp/FE17a-pm/t06.html
$B$G$9$+!#(B

$B$3$N%W%m%0%i%`$,2?$r$9$k$b$N$+$OJ,$+$C$F$$$^$9$+!)(B
print_string()$B$NBh#30z?t$K$bCM$***@_Dj$9$kI,MW$,$"$k(B
$B$H$$$&$N$OJ,$+$j$^$9$+!#(B
print_string()$B$NBh#20z?t$OC18l$NG[Ns$G:G8e$O(B NULL $B$H(B
$B$"$k$3$H$K$bCm0U$7$F$/$@$5$$!#(B
$B$3$s$J46$8$+$J!#!J%W%m%0%i%`$H$7$F$OIT40A4$G$9!K(B

int main(void)
{
CHARPROF test0001[] = {
{'T', 10}, {'h', 7}, {'i', 5}, {'s', 7},
{'a', 7}, {'p', 7}, {'e', 7}, {'n', 7},
{'.', 3} /* $B?tCM$OE,Ev(B */
};
char *z[]={"This", "is", "a", "pen.", NULL};

/* $B2~9T$5$;$F$_$k(B */
print_string(60, &z[0], test0001, 1);
return 0;
}
---
$B$d$^(B
ちゅ
2009-03-23 01:52:55 UTC
Permalink
$B$A$e(B $B$G$9!#(B

On Mon, 23 Mar 2009 01:49:21 +0900
Post by やま
http://$B>pJs=hM};n83(B.jp/FE17a-pm/t06.html
$B$3$s$J(BWeb$B$,M-$k$s$G$9$M!#(B
$BCN$i$J$+$C$?!D!#(B
--
$B$A$e(B
sunao furukawa
2009-03-23 06:24:29 UTC
Permalink
Post by やま
$B$d$^$G$9!#(B
http://$B>pJs=hM};n83(B.jp/FE17a-pm/t06.html
$B$G$9$+!#(B
$B$3$N%W%m%0%i%`$,2?$r$9$k$b$N$+$OJ,$+$C$F$$$^$9$+!)(B
$B$H$$$&$N$OJ,$+$j$^$9$+!#(B
print_string()$B$NBh#20z?t$OC18l$NG[Ns$G:G8e$O(B NULL $B$H(B
$B$3$s$J46$8$+$J!#!J%W%m%0%i%`$H$7$F$OIT40A4$G$9!K(B
int main(void)
{
CHARPROF test0001[] = {
{'T', 10}, {'h', 7}, {'i', 5}, {'s', 7},
{'a', 7}, {'p', 7}, {'e', 7}, {'n', 7},
{'.', 3} /* $B?tCM$OE,Ev(B */
};
char *z[]={"This", "is", "a", "pen.", NULL};
/* $B2~9T$5$;$F$_$k(B */
print_string(60, &z[0], test0001, 1);
return 0;
}
---
$B!!JY6/$K$J$j$^$7$?!#$I$&$b$"$j$,$H$&$4$6$$$^$9!#M}2r$G$-$?$3$H$r=q$$$F$_$^$9!#(B

$B!!#1!"1QJ8$NJ8;z$HJ8;zI}$r9M$($F(Bchar$B$X$N%]%$%s%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