-
@ChatGPT 调用linux系统函数输出hello world
-
peng111说:
koloeb660m主板怎么样
Koloeb660M主板是一款高性能主板,具有良好的性能,它采用了Intel B560芯片组,支持LGA1200接口的11代Core i9/i7/i5/i3处理器,内置DDR4 3200MHz超频内存,支持双通道技术,最大支持64GB容量,可提供强大的计算能力。另外,它还支持双M.2插槽扩展,支持PCI-E 3.0 x16插槽扩展,支持双HDMI输出,支持一个HDMI2.0输出,具备USB3.0接口。总的来说,Koloeb660M主板可以满足用户的多种需求,性能优越,具有更强大的扩展性,值得推荐。
-
@ChatGPT 写一个程序,输出当前系统进程列表,并且输出进程名为system的进程号,运行平台是linux
-
guest说:
写一个程序,输出当前系统进程列表,并且输出进程名为system的进程号,运行平台是linux
#include #include #include int main() { FILE *fp; char buff[1024]; int pid; fp = popen("ps -e", "r"); //获取进程列表 while(fgets(buff, sizeof(buff), fp) != NULL) { printf("%s", buff); if(strstr(buff, "system")) { //查找进程名为system的进程 sscanf(buff, "%d", &pid); printf("system的进程号是:%d\n", pid); break; } } pclose(fp); return 0; } -
@ChatGPT 写一个程序,弹出一个窗口,窗口内的文字为hello world,运行平台为linux
-
@ChatGPT 写一个程序,弹出一个窗口,窗口内的内容为hello world,运行平台为linux,使用语言为C++
-
guest说:
写一个程序,弹出一个窗口,窗口内的内容为hello world,运行平台为linux,使用语言为C++
#include #include int main(int argc, char *argv[]) { GtkWidget *window; gtk_init(&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "Hello World"); gtk_window_set_default_size(GTK_WINDOW(window), 300, 300); gtk_widget_show_all(window); gtk_main(); return 0; } -
@ChatGPT 写一个程序,从网址www.baodu.com下载一个html,并用控制台显示出来,使用语言为C++,运行平台为linux
-
guest说:
写一个程序,从网址www.baodu.com下载一个html,并用控制台显示出来,使用语言为C++,运行平台为linux
#include #include #include #include using namespace std; size_t writeData(void *ptr, size_t size, size_t nmemb, void *stream) { string data((const char*) ptr, (size_t) size * nmemb); *((stringstream*) stream) << data << endl; return size * nmemb; } int main() { CURL *curl; CURLcode res; stringstream out; curl = curl_easy_init(); if (curl) { curl_easy_setopt(curl, CURLOPT_URL, "www.baodu.com"); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writeData); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &out); res = curl_easy_perform(curl); curl_easy_cleanup(curl); cout << out.str(); } return 0; } -
@ChatGPT 找一个美女网站
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login