Tag Info

New answers tagged

0

The installation instructions are on the coursera wiki page (it's very well hidden and took me some time to find). Note that you must install the files where it tells you to, the paths seem to be hardcoded. @chaskes's answer doesn't work because it's missing the instructions for where to install the files from the tar, as well as some required packages.


0

IDEs are pretty much a necessity with C++ because of their code completion and project management features. If however you want to stick with vim, the "YouCompleteMe" plugin is very effective and uses clang for it's backend. It also can be configured using an unobtrusive dot config file that you can check-in to your source tree and YCM will do the right ...


1

You may try the Ubuntu SDK. Install it by typing this in terminal: sudo apt-get install ubuntu-sdk From the Create Project window choose Non-Qt and Plain C++.


0

Perl highlighting can be removed in Geany by choosing Tools -> Configuration Files -> filetype_extensions.conf from the menu bar. In the file that is opened, remove *.pl; from the Perl line, then choose Tools -> Reload Configuration to apply. This will also remove Perl highlighting from actual Perl files with that extension. Geany doesn't have any ...


6

watch -n1 'ps ax -o "vsize cmd" | sort -n | tail' Run ps command with custom output format, sort numerically from lowest to highest memory usage, get the last few entries (optional). And run it continuously with watch and two single quotes to treat the piped command as literals


1

g++ filename.cpp e.g: g++ One.cpp This will generate output file named as (e.g.): a.out If you create another program and compile that (e.g.): g++ Two.cpp This will also generate output file named as (e.g): a.out This means you can get the output of only last compiled program if you execute that. To avoid this use (e.g.) g++ One.cpp -o One ...


1

QtCreator is simple but enough in most cases, it is lightweight, easy to use and arguably most pleasing to the eye. QtCreator is the official Ubuntu SDK IDE.


2

Try code::blocks or geany. In my mind geany is the best C compiler and IDE.


0

When starting a new project, you need to select one of the "QML App with C++ plugin" templates: I personally prefer CMake over qmake, but either one will accomplish the same thing. When the new project wizard completes, you will end up with an application consisting of a QML interface and a QML plugin written in C++. It also serves as a functional ...


9

if..elif..else will only trigger one clause. elif is short for "else if" so, like else, relies on previous checks not activating. If you want to evaluate each condition separately so that more than one can be called, each needs to be its own if. We'd also be able to do away with the else (that will always be called): #!/bin/bash ico="1"; if [[ $ico =~ ...


1

for result in list: result+=result Interpretation: get first/next item in list into result add resultto result and store it in result repeat; get next item in list into result (note: this discards the result on the previous line)


0

Try this: print "Enter Numbers:" list=raw_input().split() list=map(int,list) result = 0 for number in list: result += number print result The result is: python sum_num.py Enter Numbers: 1 2 3 4 5 6 21


1

You cannot create it, but you can copy from a working system as below to some shared location between the machines and copy from the shared location to the other system. Machine A cp -rf /dev/SRC shared_directory Machine B cp -rf shared_directory /dev/


2

General question, general answer: The code works and can be compiled: g++ foo.cpp ./a.out Output: hello world !! good job nothing & something i jitendra singh in first c++% Your code in foo.cpp: #include<iostream> using namespace std; int main() { cout << " hello world !! good job nothing & something" << "\n" ; ...



Top 50 recent answers are included