zhou1996
V2EX  ›  问与答

c 语言读取文件的问题

  •  
  •   zhou1996 · Aug 27, 2019 · 1951 views
    This topic created in 2462 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
        1
    ysc3839  
       Aug 27, 2019
    什么是转义字符?“文件位置”指的是什么?
    hx1997
        2
    hx1997  
       Aug 27, 2019 via Android
    你的问题是什么意思……
    minami
        3
    minami  
       Aug 27, 2019
    Windows 下用\\或 /分割都可以打开文件,把\替换掉就行了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5408 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 03:54 · PVG 11:54 · LAX 20:54 · JFK 23:54
    ♥ Do have faith in what you're doing.