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 <iostream> | |
int main() | |
{ | |
using namespace std; | |
string s("Hello World!!!"); | |
// convert s to uppercase | |
for (auto &reference_to_s : s) // for every char in s (note: reference_to_s is a reference) | |
reference_to_s = toupper(reference_to_s); // reference_to_s is a reference, so the assignment changes the char | |
cout << s << endl; | |
} |
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
// string constructor | |
#include <iostream> | |
#include <string> | |
std::string teste(std::string nums[]){ | |
int b = nums.length(); | |
for(int a=0; a < b; a++) | |
std::cout << nums[a] << " "; | |
} |
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 <cstddef> // for std::size_t | |
#include <cstring> | |
#include <iostream> | |
template< class T, size_t N > | |
std::size_t length(const T (&)[N] ) | |
{ | |
return N; | |
}; | |
int main(){ | |
using namespace std; |
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
#!/usr/bin/env python | |
import sys | |
import pyperclip | |
import subprocess | |
################################################################################### | |
# transfer.desktop file uses %f and gives full path and we only need the filename # | |
################################################################################### | |
########################################################################## |
OlderNewer