A
A
adisos2014-09-07 15:50:03
C++ / C#
adisos, 2014-09-07 15:50:03

How to quickly deploy zsh on an ssh server without root rights?

Maybe there are already ready-made scripts, since wget pulled it from gist.github.com and you're done?
I really like zsh.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Mercury13, 2016-08-16
@Mercury13

This is very old code, way before 1998 when C++ became the standard.
Now (but not in the know - in C ++ 98 or C ++ 03), a huge number of C ++ headers have been combined into the standard template library (STL). So the code needs to be slightly modified.
1. Instead <iostream.h>of using <iostream>. <stdio.h>, in principle, works, but it is recommended to take <cstdio>.
2. All functions are in the namespace std. That is: std::cout, std::endl, etc. Or, as suggested by D' Normalization , using namespace std;.

R
RedHairOnMyHead, 2016-08-15
@ThePyzhov

1. What is wrong
2. Includes (#include) are empty
3. After the includes should be using namespace std; Or just sign cout and cin with std:: (std::cout, std::cin)

D
D', 2016-08-15
@Denormalization

Toaster, what's wrong with you? Stop breaking. Formatted and *working* code (the toaster won't suggest editing):

// Программа для преобразования
// градусов Цельсия в градусы Фаренгейта:
// Fahrenheit = NCelsius * (212 - 32)/100 + 32
//
#include <stdio.h>
#include <iostream>

using namespace std;

int main(int nNumberofArgs, char* pszArgs[])
{
  // Введите температуру в градусах Цельсия
  int nNCelsius;
  cout << "Введите температуру по Цельсию: ";
  cin >> nNCelsius;
  // для приведенной формулы преобразования
  //вычислим преобразующий множитель
  int nNFactor;
  nNFactor = 212 - 32;
  // используем вычисленный множитель для
  // преобразования градусов Цельсия в
  // градусы Фаренгейта
  int nFahrenheit;
  nFahrenheit = nNFactor * nNCelsius/100 + 32;
  // вывод результатов
  cout << "Температура по Фаренгейту: ";
  cout << nFahrenheit;
  return 0;
}

$ g++ 1.cpp
$ ./a.out
Enter Celsius temperature: 22
Fahrenheit temperature: 71

V
v_prom, 2014-09-11
@v_prom

only if you can compile it yourself in a local directory and in .bashrc register the launch of zsh, but this is somehow too crutch .. it’s better to get the rights and put it normally.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question