Advertisement
j0h

function lp Print w/o file

j0h
Oct 21st, 2015
382
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.57 KB | None | 0 0
  1. //IDK print stuff
  2. #include <stdlib.h>
  3. #include <string>
  4. #include <iostream>
  5. #include <stdio.h>
  6. using namespace std;
  7.  
  8.  
  9. void lpp (string msg)
  10. {
  11.  string imsg = msg;
  12.  const char* E = "echo \"";
  13.  const char* L = "\" | lp  ";  
  14.  string total = string(E) + string(imsg) + string(L);
  15.  //cout << total << "\n\n";
  16.  const char* cmd = total.c_str();
  17.  system(cmd);
  18. }
  19.  
  20.  
  21. int main (int argc, char ** argv)
  22. {
  23. string msg = "";
  24.  msg += "Good \n Bye \n Cruel world! ";
  25.  msg += "\nSome shit \t int the middle\n";
  26.  msg += "maor god damned bullshit";
  27. lpp(msg);
  28.  
  29. return 0;  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement