adding in working

This commit is contained in:
talksik
2023-10-03 22:35:51 -07:00
parent 9fd1ef714d
commit 0d067379e1
4 changed files with 32 additions and 10 deletions
-5
View File
@@ -2,11 +2,6 @@ cmake_minimum_required(VERSION 3.15)
project(HelloWorld) project(HelloWorld)
# gstreamer-1.0
find_package(PkgConfig REQUIRED)
pkg_check_modules(GST REQUIRED gstreamer-1.0)
include_directories(${GST_INCLUDE_DIRS})
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
set (source_dir "./src") set (source_dir "./src")
+1
View File
@@ -0,0 +1 @@
this is a test baby
BIN
View File
Binary file not shown.
+31 -5
View File
@@ -1,11 +1,37 @@
#include<iostream> #include <iostream>
#include <gst/gst.h> #include <fstream>
#include <string>
int main() std::string read_line(std::string file_path) {
{ // Create an ifstream object and associate it with the file "example.txt".
std::ifstream infile(file_path);
// If the file could not be opened, print an error message and exit the
// program.
if (!infile.is_open()) {
std::cerr << "Error: Could not open file " << file_path << std::endl;
return "";
}
// Read a line of text from the file.
std::string line;
std::getline(infile, line);
// Print the line of text to the console.
std::cout << "The first line of the file is:\n";
std::cout << line << std::endl;
// Close the file.
infile.close();
return line;
}
int main() {
std::cout << "Hello World!" << std::endl; std::cout << "Hello World!" << std::endl;
std::cin.get(); std::string line = read_line("../example.txt");
return 0; return 0;
} }