zhou1996
V2EX  ›  问与答

c 语言读取文件的问题

  •  
  •   zhou1996 · Aug 27, 2019 · 2315 views
    This topic created in 2628 days ago, the information mentioned may be changed or developed.

    c 语言中''是转义字符,在代码中读取了 windows 下文件的位置,如:C:\data\1.txt ,如何在 c 语言中实现,读到该文件位置时,将''转换为'\'?,可以用 fopen 打开

    3 replies  •  2019-08-27 19:39:48 +08:00
    ysc3839
    ysc3839
    Aug 27, 2019
    1
    什么是转义字符?“文件位置”指的是什么?
    hx1997
    hx1997
    Aug 27, 2019 via Android
    2
    你的问题是什么意思……
    minami
    minami
    Aug 27, 2019
    3
    Windows 下用\\或 /分割都可以打开文件,把\替换掉就行了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2269 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 11:42 · PVG 19:42 · LAX 03:42 · JFK 06:42
    ♥ Do have faith in what you're doing.