最近用了很多文本配置输入,考虑一个最简单的格式,适合C语言scanf读写数据。

基本数据类型直接使用常用形式。
double 直接用小数,对应%f读取。
int 直接用十进制整数,对应%d读取。
char* 直接用字符串,不增加“”。

如果double和int类型的数组,可以在一行中添加多个数组,使用空白分隔。
为了可读性,行长不超过80,下行继续时使用空白字符开始。例如:

1 2 3 4 5 6 7 8 9 10
2 3 4 5 6 7 8 9 10

字符串以行末结束,不支持行内有换行。对应%[^\n]读取。
多行字符串需要以$号结尾,且字符串中不能出现$。对应%[^$]读取。

结构体以多行的名值对,名只能有一个字段,以空行结束。

T name
a 32
b 20 20 20 20
c hello world.
<-

Free Style Structure text的更多相关文章

  1. Jetpack Compose学习(2)——文本(Text)的使用

    原文: Jetpack Compose学习(2)--文本(Text)的使用 | Stars-One的杂货小窝 对于开发来说,文字最为基础的组件,我们先从这两个使用开始吧 本篇涉及到Kotlin和DSL ...

  2. Bootstrap WPF Style,Bootstrap风格的WPF样式

    简介 GitHub地址:https://github.com/ptddqr/bootstrap-wpf-style 此样式基于bootstrap-3.3.0,样式文件里的源码行数都是指的这个版本.CS ...

  3. style,currentStyle,getComputedStyle的区别和用法

    先说说层叠样式表的三种形式(三种的叫法不一,按照各自的习惯): 一.内联样式:在HTML标签用style属性设置.如: 1 <p >这是内联样式</p> 二.嵌入样式:通过&l ...

  4. jquery html属性和text属性的区别

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  5. js动态创建style节点(js文件中添加css)

    ie6 不能 document.createElement('style') 然后append到head标签里.所以就找到这样个好文章 --------------------- 有很多提供动态创建 ...

  6. grid style

    <style type="text/css"> .g_grid tr{ border-left:none; border-right:none; border-top: ...

  7. 网页边框样式与style样式部分总结

    1).border边框样式:border-style:solid 边框样式值如下: none : 无边框.与任何指定的border-width值无关 hidden : 隐藏边框.IE不支持 dotte ...

  8. bootstrap style for jQuery UI Dialog

    页面引用: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> ...

  9. android:style.xml

    <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2006 The Andr ...

随机推荐

  1. 【转】如何在html与delphi间交互代码

    [转]如何在html与delphi间交互代码 (2015-11-19 22:16:24) 转载▼ 标签: it 分类: uniGUI uniGUI总群中台中cmj朋友为我们总结了如下内容,对于利用de ...

  2. hive启动时报错 java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D at org.apache.hadoop.fs.Path.initialize

    错误提示信息如下 错误信息如下 [root@node1 bin]# ./hive Logging initialized -bin/lib/hive-common-.jar!/hive-log4j.p ...

  3. 在eclipse中引入jquery.js文件报错的解决方案

    从官方下载的jquery.js在myeclipse始终用个大大的红叉,看着很不爽,如何解决呢:jquery.js在myeclipse中报错:jquery.js -> 鼠标右键 -> MyE ...

  4. poj 1080 Human Gene Functions(lcs,较难)

    Human Gene Functions Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 19573   Accepted:  ...

  5. Spring Boot -- actuator

    Spring Boot有四大神器,分别是auto-configuration.starters.cli.actuator,本文主要讲actuator.actuator是spring boot提供的对应 ...

  6. Java钉钉开发_02_免登授权(身份验证)

    源码已上传GitHub: https://github.com/shirayner/DingTalk_Demo 一.本节要点 1.免登授权的流程 (1)签名校验 (2)获取code,并传到后台 (3) ...

  7. 【ACM-ICPC 2018 徐州赛区网络预赛】D.Easy Math 杜教筛

    代码 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 20000000; ...

  8. 【leetcode刷题笔记】Path Sum

    Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all ...

  9. 【遍历二叉树】02二叉树的中序遍历【Binary Tree Inorder Traversal】

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 给定一个二叉树,返回他的中序遍历的 ...

  10. POJ1442:Black Box

    浅谈堆:https://www.cnblogs.com/AKMer/p/10284629.html 题目传送门:http://poj.org/problem?id=1442 用对顶堆维护第\(k\)小 ...