묻고 답해요
156만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨우아한 고성능 프로그래밍 언어 Rust 입문 및 활용
문자열 리터럴이 너무 어려워요ㅠㅠ
문자열 리터럴이 뭘 뜻하는지 잘 모르겠어요.리터럴이 말 그대로 데이터 값 그 자체라고 생각했는데요 (ex 2, 4, "hello") 그런데 강의 중 "문자열 리터럴이 특정 영역에 있는 문자열 데이터를 참조하고 있는 값"이라고 설명하셔서 혼란스러워요.그럼 문자열 리터럴은 결국 문자열을 가리키고 있는 포인터인가요?let hello: &str = "hello" 그리고 "문자열 리터럴이 특정 영역에 있는 문자열 데이터를 참조하고 있는 값" -> 여기서 특정 영역은 data 영역을 말하는 것일까요?리터럴이라는 용어 자체가 그냥 데이터 값이라고 알고 있었는데, 리터럴이 참조 값이었고 타입은 문자열 슬라이스 타입이어서 헷갈려요ㅠㅠ 도와주세요
-
해결됨우아한 고성능 프로그래밍 언어 Rust 입문 및 활용
Integer는 자동으로 copy되서(copy type)(integer 는 stack에 할당되서)
예문을Integer먼저 넣고 두번째 변수는 String 이게 더 좋지 않을까요? 출처 https://www.reddit.com/r/rust/comments/up1yhg/rust_ownership_for_integer_vs_string_literals/What’s going on under the covers is that when a variable who’s type has a constant length (like an integer) gets passed to a function, rust allocates space on the call stack for that variable and copies it’s value into the function’s call stack. Thus the instance of X that your function gets is different (is at a different memory address) than the copy of X that was passed to it. For strings, the compiler doesn’t know how much space to allocate (because the function could be called with your constant length string or any other string).
-
해결됨우아한 고성능 프로그래밍 언어 Rust 입문 및 활용
명령어를 입력 한 후 source "$HOME/.cargo/env" 이 명령어를 입력해야 합니다.
명령어를 입력 한 후 source "$HOME/.cargo/env" 이 명령어를 입력해야 합니다. 해당 설명이 누락되어 있는 것 같아서요.! 참고로 저는 m1 입니다!
-
미해결웹 개발의 혁신: C, C++, Rust로 시작하는 WebAssembly 마스터 클래스
강의 노트(PPT) 파일은 제공이 안되는 건가요?
안녕하세요.강의에서 사용되는 강의 노트(PPT) 파일은 제공이 안되는 건가요?다운로드 받는 곳을 찾지 못해 문의 드립니다.감사합니다.수고하세요.
-
미해결웹 개발의 혁신: C, C++, Rust로 시작하는 WebAssembly 마스터 클래스
clock 예제 빌드 오류
안녕하세요 두가지 에러문제로 질문드립니다1번째는 clock 예제를 시작하고 빌드를 하니까 qmake 스텝에서 오류가 나온다고 합니다그 전 강의에서 cmake 가 오류가 적다 말씀하셔서 그 부분을 의심하고 qmake를 cmake로 변경하기위해 구글링 해봤지만 설정을 어떻게 바꾸는지 못찾겠습니다..... 2번째는 include를 하는 곳에서 참조가 안된다하는데 추가로 다른 파일을 다운받아야하나요....? 강의에서 보여주신 qt maintenace에서 다운로드 해야하는것은 체크해서 다운받았는데 참조가 안된다고 하네요....
-
미해결웹 개발의 혁신: C, C++, Rust로 시작하는 WebAssembly 마스터 클래스
Wasm windows 개발환경 구축 중 오류
windows 상에서 개발환경 구축중에 질문있습니다 명령 프롬프트를 사용해 emscripten을 설치 중emsdk.bat install latest는 성공하였지만emsdk.bat activate latest 는 실패하고 오류 메시지로 아래와 같이 나옵니다UnicodeEncodeError: 'cp949' codec can't encode character '\xa0' in position 950: illegal multibyte sequence 확인해본결과 파이썬 인코딩때문에 그런거같아서chcp 65001로 변경하여 유니코드로 변경해서 명령프롬프트를 다시한번 시도하였으나 여전히 같은 에러가 뜹니다....다른 방법이 있을까요...? https://emscripten.org/docs/getting_started/downloads.html이 사이트를 통해서 Gitbash를 source ./emsdk_env.sh 할 경우도 같은 오류가 발견됩니다 emsdk.bat activate latest 입력 후 나오는 전체 메시지 공유드립니다Resolving SDK alias 'latest' to '3.1.41'Resolving SDK version '3.1.41' to 'sdk-releases-eb71265ef0ab905620015adbfedacf88c5dbf021-64bit'Setting the following tools as active:node-15.14.0-64bitpython-3.9.2-nuget-64bitjava-8.152-64bitreleases-eb71265ef0ab905620015adbfedacf88c5dbf021-64bitAdding directories to PATH:PATH += G:\StartUp\web\emsdk-mainPATH += G:\StartUp\web\emsdk-main\node\15.14.0_64bit\binPATH += G:\StartUp\web\emsdk-main\upstream\emscriptenSetting environment variables:PATH = G:\StartUp\web\emsdk-main;G:\StartUp\web\emsdk-main\node\15.14.0_64bit\bin;G:\StartUp\web\emsdk-main\upstream\emscripten;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\bin;C:\Python38\Scripts\;C:\Python38\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;C:\ProgramData\chocolatey\lib\cunit\lib;C:\ProgramData\chocolatey\lib\tinyxml2\lib;C:\ProgramData\chocolatey\lib\log4cxx\lib;C:\ProgramData\chocolatey\lib\bullet\lib;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\dotnet\;D:\Putty\;C:\Program Files\Git\cmd;C:\Users\yubi2\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\yubi2\AppData\Local\Programs\Python\Python311\;C:\Users\yubi2\AppData\Local\Microsoft\WindowsApps;C:\Program Files\OpenSSL-Win64\bin\openssl.cfg;C:\MinGW\bin;C:\Program Files\CMake\bin;C:\Users\yubi2\.dotnet\tools;G:\창업\rasberry\SysGCC\bin;D:\QT\Tools\mingw1120_64\bin;D:\QT\6.4.3\wasm_32\bin;D:\QT\6.5.0\wasm_multithread\bin;D:\QT\6.5.0\wasm_singlethread\bin;D:\Python\PyCharm Community Edition 2023.1.2\bin;D:\Python\PyCharm 2023.1.2\binEMSDK = G:/StartUp/web/emsdk-mainEMSDK_NODE = G:\StartUp\web\emsdk-main\node\15.14.0_64bit\bin\node.exeEMSDK_PYTHON = G:\StartUp\web\emsdk-main\python\3.9.2-nuget_64bit\python.exeJAVA_HOME = G:\StartUp\web\emsdk-main\java\8.152_64bitClearing existing environment variable: EMSDK_PYTraceback (most recent call last):File "G:\StartUp\web\emsdk-main\emsdk.py", line 3072, in <module>sys.exit(main(sys.argv[1:]))File "G:\StartUp\web\emsdk-main\emsdk.py", line 3011, in mainactive_tools = set_active_tools(tools_to_activate, permanently_activate=arg_permanent, system=arg_system)File "G:\StartUp\web\emsdk-main\emsdk.py", line 2384, in set_active_toolswrite_set_env_script(env_string)File "G:\StartUp\web\emsdk-main\emsdk.py", line 2359, in write_set_env_scriptopen(EMSDK_SET_ENV, 'w').write(env_string)UnicodeEncodeError: 'cp949' codec can't encode character '\xa0' in position 950: illegal multibyte sequence