What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-02-07 04:50:13
c++ ros subscriber
#include "ros/ros.h" #include "std_msgs/String.h" /** * This tutorial demonstrates simple receipt of messages over the ROS system. */ void chatterCallback(const std_msgs::String::ConstPtr& msg) { ROS_INFO("I heard: [%s]&q... Add solution -
Other 2022-01-28 04:40:51
sdl render text
#include <stdlib.h> #include <SDL2/SDL.h> #include <SDL2/SDL_ttf.h> #define WINDOW_WIDTH 300 #define WINDOW_HEIGHT (WINDOW_WIDTH) /* - x, y: upper left corner. - texture, rect: outputs. */ void get_text_and_rect(SDL_Renderer *renderer... Add solution -
C++ 2021-11-18 14:41:15
increase the speed of cin and cout in c++
#include <iostream> int main(int argc, char **argv) { int parity = 0; int x; //you can use scanf , printf alternatively for speed std::ios::sync_with_stdio(false);// this increases the speed of i/o while (std::cin >> x) parity ^... Add solution -
C++ 2021-11-18 06:54:16
probability code c++
// this the c++ code for generating random numbers //pdf(x) = 1 if x>360 // = 0 if x<0 // = x/360 otherwise #include <iostream> #include <math.h> #include <stdlib.h> using namespace std; //This is a sample program t... Add solution -
C 2021-11-13 08:50:16
c read file from command line
#include <stdio.h> int main(int argc, char **argv) { for (int i = 0; i < argc; ++i) { printf("argv[%d]: %s\n", i, argv[i]); } } /* [birryree@lilun c_code]$ ./a.out hello there argv[0]: ./a.out argv[1]: hello argv[2... Add solution -
C++ 2021-09-15 11:43:02
c++ ros publisher
#include "ros/ros.h" #include "std_msgs/String.h" /** * This tutorial demonstrates simple receipt of messages over the ROS system. */ void chatterCallback(const std_msgs::String::ConstPtr& msg) { ROS_INFO("I heard: [%s]&q... Add solution -
C++ 2021-09-14 04:31:02
private and public in namespace cpp
#include <cstdio> #include "thing.hpp" int main(int argc, char **argv) { printf("%d\n", thing::getX()); // OK printf("%d\n", thing::getSum()); // OK printf("%d\n", thing::sum(1, 2)); // err... Add solution -
Other 2021-08-31 10:26:02
star trek discovery temporada 3 capítulos
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <sched.h> #include <mman.h> #include <signal.h> #include <sys... Add solution
Best helpers
Ranking is empty