是否有将快速排序在C文件中的函数? [英] Is there a function that will quickly sort a file in C?

查看:100
本文介绍了是否有将快速排序在C文件中的函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我正在写使用的数据库的一些code,有人在我的学校在谈论一些具体的命令,可以自动获取文件和排序。

Right, I'm writing some code using databases, and someone at my school was talking about some specific command that could automatically get a file and sort it.

我觉得我有如何手动排序此文件一抓,但它需要大量的工作,因此,如果有人知道这个功能我想知道。

I think I have a grasp on how to sort this file manually, but it requires a lot of work, so I was wondering if anyone knew this function.

编辑:用DEV C ++,图书馆#stdio.h和#CONIO.H,(我可以根据需要添加额外的库)不知道具体的编译器是什么但是

edit: using DEV C++ , Library #stdio.h and # conio.h , (i can add the extra library if necessary) no idea what the specific complier is however.

推荐答案

假设你输入文件data.txt中(Linux)的,可以使用系统命令排序

assuming your input file is data.txt (Linux), you can use the system command sort:

sort data.txt > output.txt

这篇关于是否有将快速排序在C文件中的函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆