<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:media="http://search.yahoo.com/mrss/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>C - 四号程序员</title>
	<atom:link href="https://www.coder4.com/archives/tag/c/feed" rel="self" type="application/rss+xml" />
	<link>https://www.coder4.com</link>
	<description>Keep It Simple and Stupid</description>
	<lastBuildDate>Fri, 17 May 2024 08:39:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>Linux下VSCode配置C / C++</title>
		<link>https://www.coder4.com/archives/8141</link>
					<comments>https://www.coder4.com/archives/8141#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Wed, 07 Feb 2024 11:23:34 +0000</pubDate>
				<category><![CDATA[C && C++]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[vscode]]></category>
		<category><![CDATA[编译错误]]></category>
		<guid isPermaLink="false">https://www.coder4.com/?p=8141</guid>

					<description><![CDATA[1 安装插件 C / C++ 2 配置include 出现“#include errors detected.”时，按ctrl + .跳转进入配置，或者打开c_cpp_properties.json直接配置： { "configurations": [ { "name": "Linux", "includePath": [ "${workspaceFolder}/**",[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/8141/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>vscode支持C工程的多文件编译</title>
		<link>https://www.coder4.com/archives/7846</link>
					<comments>https://www.coder4.com/archives/7846#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Fri, 24 Mar 2023 14:43:34 +0000</pubDate>
				<category><![CDATA[C && C++]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[vscode]]></category>
		<category><![CDATA[多文件]]></category>
		<category><![CDATA[编译]]></category>
		<guid isPermaLink="false">https://www.coder4.com/?p=7846</guid>

					<description><![CDATA[默认只支持单文件，修改.vscode/tasks.json中的 "args": [ "-fdiagnostics-color=always", "-g", "${workspaceFolder}/**.c", "-o", "${fileDirname}/${fileBasenameNoExtension}"[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/7846/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>使用Antlr的C接口(3.4版)</title>
		<link>https://www.coder4.com/archives/4016</link>
					<comments>https://www.coder4.com/archives/4016#comments</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Sat, 09 Nov 2013 07:30:24 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Antlr]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Target]]></category>
		<category><![CDATA[词法分析]]></category>
		<category><![CDATA[语法分析]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=4016</guid>

					<description><![CDATA[昨天听同事介绍了Antlr 4，它是一个非常强大的词法、语法分析器辅助生成工具，比之前用Flex + Bison强太多倍。 遗憾的是，当前的v4只支持Java，暂不支持C、C++，于是降级了一把，尝试了一下在3.4版上使用Antlr C。 要说明的是，这不是一篇原创文章，我参考了两篇文章，如下： 《用ANTLR3实现规则解析----1-安装》 http://blog.csdn.net/wfp458113181wfp/article/details/9148577 《ANT[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/4016/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>C++中，解析UTF-8字符的位置。</title>
		<link>https://www.coder4.com/archives/3986</link>
					<comments>https://www.coder4.com/archives/3986#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Mon, 23 Sep 2013 06:00:08 +0000</pubDate>
				<category><![CDATA[C && C++]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[UTF-8]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=3986</guid>

					<description><![CDATA[在C++的char*以及string中，使用的是字节流编码，即sizeof(char) == 1。 也就是说，C++是不去分字符的编码的。 而一个合法UTF8的字符长度可能为1～4位。 现在假设一串输入为UTF8编码，如何能准确的定位到每个UTF8字符的“CharPoint”，而不会错误的分割字符呢？ 参考这个页面：http://www.nubaria.com/en/blog/?p=289 可以改造出下面的函数： const unsigned char kFirs[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/3986/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>C++ Boost智能指针(smart_ptr)快速指南</title>
		<link>https://www.coder4.com/archives/3782</link>
					<comments>https://www.coder4.com/archives/3782#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Fri, 01 Feb 2013 03:53:17 +0000</pubDate>
				<category><![CDATA[C && C++]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[智能指针]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=3782</guid>

					<description><![CDATA[智能指针（smart_ptr）是Boost各组件中，应用最为广泛的一个。 重所周知，C++没有提供Java中的垃圾回收机制。因此，在堆上申请的内存，需要自行回收，这就很容易导致内存泄漏。虽然STL提供了auto_ptr，但是受限太多(例如，不能放到容器中。。。)，因此很少有人使用。 Boost从很早就提供了如下的智能指针，并且功能一直保持稳定： scoped_ptr：不可拷贝，承载new。 scoped_array：不可拷贝，承载new []。 shared_ptr：[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/3782/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>C++中Trim的方法</title>
		<link>https://www.coder4.com/archives/2198</link>
					<comments>https://www.coder4.com/archives/2198#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Thu, 22 Sep 2011 03:08:18 +0000</pubDate>
				<category><![CDATA[C && C++]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Trim]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=2198</guid>

					<description><![CDATA[C++中Trim的方法，其实也是写的很Trick的…… 参考：http://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring #include &#60;stringstream&#62; void trim(::std::string &#38; str) { //left str.erase(str.begin(), std::find_if(str.begin(),[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/2198/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>C++使用strtok实现分割字符串。</title>
		<link>https://www.coder4.com/archives/2188</link>
					<comments>https://www.coder4.com/archives/2188#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Wed, 21 Sep 2011 11:08:14 +0000</pubDate>
				<category><![CDATA[C && C++]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[分割字符串]]></category>
		<category><![CDATA[字符串]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=2188</guid>

					<description><![CDATA[C++中有一些号称很优雅的功能和方法……但是有的压根不能指定分隔符，有的依赖于stream所以分隔符只能是char，真是Ugly到家了…… 比如stackoverflow中提到的诸多方法：http://stackoverflow.com/questions/236129/how-to-split-a-string-in-c 其实strtok是标准的c函数啊，而且现在重入问题也已经被解决了，通过保存指针的方式，为什么不喜欢用呢？ 我一直认为，C++是最难用的语言，没有之一。 9[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/2188/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>在Python中调用C++，使用SWIG</title>
		<link>https://www.coder4.com/archives/2141</link>
					<comments>https://www.coder4.com/archives/2141#comments</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Thu, 15 Sep 2011 13:11:58 +0000</pubDate>
				<category><![CDATA[C && C++]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SWIG]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=2141</guid>

					<description><![CDATA[SWIG：Simplified Wrapper and Interface Generator，顾名思义，就是将C/C++包装为其他高级语言的Wrapper工具，非常好用。 该项目历史悠久（创始于1995年！），且一直非常活跃，目前最新版本为2011年5月发布的2.0.4。 1、安装SWIG wget http://prdownloads.sourceforge.net/swig/swig-2.0.4.tar.gz tar -xzvf swig-2.0.4.tar.gz cd[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/2141/feed</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>使用C++和zlib解压缩.gz文件并读入内存</title>
		<link>https://www.coder4.com/archives/1707</link>
					<comments>https://www.coder4.com/archives/1707#comments</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Fri, 01 Jul 2011 09:45:55 +0000</pubDate>
				<category><![CDATA[C && C++]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[.gz]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[内存]]></category>
		<category><![CDATA[处理]]></category>
		<category><![CDATA[解压缩]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=1707</guid>

					<description><![CDATA[一般我们自己用.gz文件的时候会先 gzip xxx.gz 然后就地解压缩生成文件，如果本身就是要原文件还行，但如果再程序需要在内存中再处理，就不OK了。 因为会浪费两次I/O，特别是文件特别大或者特别多的时候。 因此，使用zlib将.gz文件直接解压并读取到内存，就很重要了。 #include &#60;zlib.h&#62; #include &#60;iostream&#62; #include &#60;string&#62; #define GZ_BUF_SIZE 104857[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/1707/feed</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>[转载]用C语言进行CGI程序设计</title>
		<link>https://www.coder4.com/archives/1599</link>
					<comments>https://www.coder4.com/archives/1599#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Thu, 26 May 2011 04:16:19 +0000</pubDate>
				<category><![CDATA[C && C++]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[cgi]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=1599</guid>

					<description><![CDATA[转载自：用C语言进行CGI程序设计 感谢原作者！ 写的比较基础，适合像我这样刚接触cgi的小孩……我看我们项目中貌似是用了别的库封装，可以减少不少代码量吧。 一、CGI概述 &#160; CGI(公用网关接口)规定了Web服务器调用其他可执行程序(CGI程 序)的接口协议标准。Web服务器通过调用CGI程序实现和Web浏览器的 交互,也就是CGI程序接受Web浏览器发送给 Web服务器的信息,进行处 理,将响应结果再回送给Web服务器及Web浏览器。CGI程序一般完成We[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/1599/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
