-
First, install the cpptools extension in studio code
-
Then add the include paths in the c_cpp_properties.json file.
If a small light bulb icon (💡) appears near the include statements on any of your source file, just click it in order to access the c_c_pp_properties.json file.
If there's no 💡 icon, then in the project directory create a hidden folder called vscode:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// class kaze::hacktion | |
// | |
function hacktion(int n){ | |
int virus = 0; | |
for(int i=0; i<n; i++){ | |
virus += 100; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// QuickTimeImplAvf.mm | |
// line 296 | |
void MovieBase::seekToFrame( int frame ) | |
{ | |
if( ! mPlayer ) | |
return; | |
//CMTime currentTime = [mPlayer currentTime]; | |
//CMTime oneFrame = CMTimeMakeWithSeconds(1.0 / mFrameRate, currentTime.timescale); // ERROR, timescale=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RPi 3.2 inch TFT setup | |
Device | |
https://www.conrad.de/de/raspberry-pi-display-modul-schwarz-rb-tft32-v2-raspberry-pi-a-b-b-raspberry-pi-1380381.html | |
English document | |
https://www.waveshare.com/wiki/3.2inch_RPi_LCD_(B) | |
Chinese document | |
http://www.waveshare.net/wiki/3.2inch_RPi_LCD_(B) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ofApp{ | |
public: | |
ofApp(){}; | |
static ofApp& get(){ | |
static ofApp app; | |
return app; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofApp.h" | |
void ofApp::setup(){ | |
ofBackground(0, 255); | |
ofTrueTypeFont::setGlobalDpi(72); | |
font.load("Gotham Bold.otf", 22, true, true); | |
font.setLetterSpacing(3); | |
} | |
void ofApp::draw(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void update(ofEventArgs &e) { | |
weConnected = tcpClient.isConnected(); | |
if (weConnected) { | |
string str = tcpClient.receive(); | |
if (str.length() > 0) { | |
ofNotifyEvent(tcpMessageReceived, str, this); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MyClass.h | |
// | |
#pragma once | |
class MyClass{ | |
public: | |
ofParameter<int> myInt{"MyInt", 0, 0, 100}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MyClass.h | |
// | |
#pragma once | |
#include "ofxGui.h" | |
class MyClass{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MyClass.h | |
// | |
#pragma once | |
#include "ofxGui.h" | |
class MyClass{ |
OlderNewer