c语言网址
❶ c语言打开网址问题!!!
数组最后一位要留'\0'作为结束符号,并且\符号得用\\来表示,否则将把\视为特殊符的前缀。所以需要保证数组长度。直接用system函数打开方便些
❷ 谁能推荐一个学习c语言的网站
这里有视频教程:
http://www.enet.com.cn/article/2012/0822/A20120822153730.shtml
❸ 用c语言判断网址怎么做呢
/*
问题地址:http://..com/question/317437658.html
详解:
标准的网址(URL)格式是这样的:
http://user:pass@myserver:port/myapp1/myapp2/index.html?key1=value2&key2=value2#anchor
其中:
[1] http 是协议类型,同样的还有 ftp 等。【可省略,一般浏览器默认都是 http】
[2] user 是用户名,pass 是密码。【可省略】
[3] myserver 可以是服务器的 ip 或者域名,
如网络的 ip = 220.181.112.143 , 域名是:www..com
【这个不能省略】
[4] port 是端口。【可省略,一般默认都是 80】
[5] myapp1,myapp2 是应用程序目录。【可省略】
index.html 是当前页面【可省略,默认是 index.html,default.html 等】
[6] key1,value1,key2,value2 是传递给网站的参数,【可省略】
[7] anchor 是网页内的锚点
合法的网址举例:
www..com
http://__anglfish:[email protected]:80/
http://..com/question/311110938.html?an=0&si=1
判断网址算法:
最简单的当然是正则表达式了。
我们看到标准网址(URL)的 7 个部分,有 6 个分割符号,分别是:
://
@
:
/
?
#
在浏览器里面,只有第 3 部分是必须填写的,也是我们日常写的最多的。
用到的资源文件:
头文件 deelx.h,可以到:http://www.regexlab.com/zh/deelx/下载
下载后放到和源程序同一个目录下即可。
*/
#include <stdio.h>
#include "deelx.h"
int main(int argc, char * argv[])
{
char text[1000] = "http://user:[email protected]:800/myapp1/myapp2/index.html?key1=value1&key2=value2#anchor";
// 判断合法网址的正则表达式
static CRegexpT <char> regexp
(
"(([:alpha:]+)\\://)?((\\w+)\\:(\\w+)@)?(\\w+(\\.\\w+)*)(\\:(\\d+))?((/\\w+)*(\\.\\w+)?)?(\\?((\\w+=\\w+&)*(\\w+=\\w+)))?(#((\\w+)))?)"
);
int i;
printf("输入一个网址:");
while(scanf("%s",text))
{
MatchResult result = regexp.Match(text);
if ( result.IsMatched() )
{
/*
for(i=0;i<result.MaxGroupNumber();i++)
{
printf("%d=%.*s\n", i,result.GetGroupEnd(i) - result.GetGroupStart(i), text + result.GetGroupStart(i));
}
*/
// 解析网址
printf("网址:%.*s\n", result.GetGroupEnd(0) - result.GetGroupStart(0), text + result.GetGroupStart(0));
printf("协议类型:%.*s\n",result.GetGroupEnd(2) - result.GetGroupStart(2), text + result.GetGroupStart(2));
printf("用户名:%.*s\n",result.GetGroupEnd(4) - result.GetGroupStart(4), text + result.GetGroupStart(4));
printf("用户密码:%.*s\n",result.GetGroupEnd(5) - result.GetGroupStart(5), text + result.GetGroupStart(5));
printf("服务器IP或域名:%.*s\n",result.GetGroupEnd(6) - result.GetGroupStart(6), text + result.GetGroupStart(6));
printf("服务器端口:%.*s\n",result.GetGroupEnd(9) - result.GetGroupStart(9), text + result.GetGroupStart(9));
printf("应用程序目录:%.*s\n",result.GetGroupEnd(10) - result.GetGroupStart(10), text + result.GetGroupStart(10));
printf("查询参数:%.*s\n",result.GetGroupEnd(14) - result.GetGroupStart(14), text + result.GetGroupStart(14));
printf("锚:%.*s\n\n",result.GetGroupEnd(18) - result.GetGroupStart(18), text + result.GetGroupStart(18));
}
else
{
printf("\"%s\" 是一个非法的网址!!!\n",text);
}
printf("输入一个网址:");
}
return 0;
}
/*
运行结果:
输入一个网址:http://user:[email protected]:800/myapp1/myapp2/index.html?key1=value1&key2=value2#anchor
网址:http://user:[email protected]:800/myapp1/myapp2/index.html?key1=value1&key2=value2#anchor
协议类型:http
用户名:user
用户密码:pass
服务器IP或域名:myserver.com
服务器端口:800
应用程序目录:/myapp1/myapp2/index.html
查询参数:key1=value1&key2=value2
锚:anchor
*/
❹ 有没有学习C语言的网址,零基础的那种
C语言之家 http://bbs.cpcw.com/archiver/ http://www.chris-lott.org/resources/cstyle/indhill-cstyle.html C语言规范 http://bbs.vcok.com/list.asp?boardid=3 数据结构 http://www.vcok.com/ vc论坛 http://www.programfan.com/ 编程爱好者 http://www.ddvip.net/ 编程学习 http://www.cstudyhome.com/wenzhang06/default.asp C语言之家 http://ettc.sysu.e.cn/wlkc/shujujiegou/teaching/chapter1/chapter1-1-1.html 什么是数据结构(1学时) http://www.hyxp.net/index.html huayu online c语言 我感觉还不如买一本书系统的学习一下。我那时候用的是 大连理工出版社的《C语言程序设计》
❺ 有关C语言学习的网址都有那些
推荐:
1.C语言编程宝典
http://www.cnread.net/cnread1/dnwl/cxsj/c/cyyb/
http://www.cnool.net/tianyige/computer/tc/
2.C In China
http://www.cinchina.com/
3.网络C语言吧
http://post..com/f?kw=c%D3%EF%D1%D4
4.编程中国
http://www.bc-cn.net/Article/kfyy/cyy/
5.C语言之家
http://www.cstudyhome.com/wenzhang06/default.asp
6.C语言基地
http://www.cyybase.com/
祝愿你学习愉快~
❻ C语言学习和资料下载网址
c语言学习资料
1.C语言初学者入门讲座:http://www.hlib.cn/search.asp?keyword=C%D3%EF%D1%D4%B3%F5%D1%A7%D5%DF%C8%EB%C3%C5%BD%B2%D7%F9
2.C/C++头文件一览:http://www.hlib.cn/article/program/640.asp
3.C/C++中的整型常识:http://www.hlib.cn/article/program/638.asp
4.C语言编程技巧汇萃:http://www.hlib.cn/article/program/917.asp
http://www.hlib.cn/article/program/918.asp
5.C高级编程:http://www.hlib.cn/article/program/1396.asp
6.C语言设计并行处理:http://www.hlib.cn/article/program/1403.asp
7.C语言常用的三种排序方法总结与探讨:http://www.hlib.cn/article/program/775.asp
8.关于二十四点游戏的编程思路与基本算法:http://www.hlib.cn/article/program/842.asp
9.TC中的串口编程:http://www.hlib.cn/article/program/1118.asp
10.以前常用的攻击软件源代码:http://www.hlib.cn/article/program/1206.asp
11.DOS游戏编程21条:http://www.hlib.cn/article/program/1528.asp
12.C语言图形处理:http://www.hlib.cn/article/program/879.asp
13.点阵的汉字程序:http://www.hlib.cn/article/program/1445.asp
14.Turbo C位图和BMP位图格式分极及应用:http://www.hlib.cn/article/program/1431.asp
15.在16色模式下显示256色及全彩色:http://www.hlib.cn/article/program/1427.asp
16.有趣的分形学Mandlbrot集图形的一个C语言实现:http://www.hlib.cn/article/program/1467.asp
17.C语言常见错误小结:http://www.hlib.cn/article/program/984.asp
18.C语言编程中的常见问题:http://www.hlib.cn/search.asp?keyword=C%D3%EF%D1%D4%B1%E0%B3%CC+%B3%A3%BC%FB%CE%CA%CC%E2
❼ c语言的官网是多少
C语言被发明出来的时候大概是20世纪70年代,中国引入互联网是1994年。
所以C语言诞生的时候是没有官网的。C语言是贝尔实验室的某个人发明的,名字我忘了。贝尔实验室当时隶属于AT&T公司。现在该公司已经被拆的七零八落,已经不是发明C的时候那种如日中天的公司了,上哪去找C的官网了。
现在也许可以认为 ”美国国家标准协会“是C的官网,因为他制定了ANSI C的标准
我们通常用的printf函数等等,都是ANSI C标准库中制定的 ,而且不论什么版本的C,VC,gcc,都必须符合ANSI C。
❽ c语言实现 请求网址
首先, 127.0.0.1是本机地址
❾ 如何用C语言打开网站
参考代码如下:
#include<windows.h>
intmain(void)
{
ShellExecute(NULL,"open","http://www..com",NULL,NULL,SW_MINIMIZE);
return0;
}
例子中是最小化打开的,还可以是最大化SW_MAXIMIZE,隐藏SW_HIDE等。
❿ C语言 的网址
http://www.vcok.net
阅读《C语言程序设计》这本书或者到到我的论坛下载,地址:http://www.vcok.net/best/vcok_1.chm