조성현

중간버전 (미완)

......@@ -149,6 +149,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="curl_processor.cpp" />
<ClCompile Include="EdgeItem.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_GraphicsView.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
......@@ -218,6 +219,7 @@
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="curl_processor.h" />
<ClInclude Include="EdgeItem.h" />
<ClInclude Include="stdafx.h" />
<CustomBuild Include="GraphicsView.h">
......
......@@ -83,6 +83,9 @@
<ClCompile Include="stdafx.cpp">
<Filter>PCH</Filter>
</ClCompile>
<ClCompile Include="curl_processor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="PaperGraphWidget.h">
......@@ -111,5 +114,8 @@
<ClInclude Include="stdafx.h">
<Filter>PCH</Filter>
</ClInclude>
<ClInclude Include="curl_processor.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file
......
#include "stdafx.h"
#include "curl_processor.h"
curl_processor::curl_processor()
{
}
curl_processor::~curl_processor()
{
}
#ifndef CURL_PROCESSOR_H
#define CURL_PROCESSOR_H
#include <stdafx.h>
class curl_processor
{
//private var
private:
CURL *curl;
CURLcode res;
//constructor, destructor
public:
curl_processor();
~curl_processor();
//method
public:
};
#endif // CURL_PROCESSOR_H
\ No newline at end of file
......@@ -2,36 +2,8 @@
#include "PaperGraphWidget.h"
#include "MainWindow.h"
#include <stdio.h>
#include <curl/curl.h>
int main(int argc, char *argv[])
{
if (1) {
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* example.com is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* Check for errors */
if (res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
QApplication app(argc, argv);
MainWindow m;
......
......@@ -29,6 +29,8 @@
#include <boost/graph/topology.hpp>
#include <boost/regex.hpp>
#include <curl/curl.h>
#include <cstdio>
#include <cstdlib>
#include <cstring>
......