Ok, thank you both.
Type: Posts; User: Ene Dene
Ok, thank you both.
Is it possible to have more than just one type of command line arguments? What I mean by that is, for example: If I wanted to make a program that replaces words in some files, input in command line...
Thanks!
I was woundering if there is some kind of function that returns what is the lowest posible spacing for some variable.
For example, in Fortran you can use function "spacing". Lets say that a variable...
Thank you both.
Lets say that I want a dynamic 2D array, I would do it in following way:
double (*koordinates)[3] = new double [number_of_points][3]
where number_of_points variable is inputed while program...
If I want all permutations of 1D array I have:
#include <iostream>
#include <algorithm>
using namespace std;
main() {
int arr[4]={1,2,3,4};
Thank you very much, this works! :)
Of course, vector is better, I said array for simplicity. I can't use a loop, becoase I don't know the basis of reading from files. I'm not asking for algoritam (although I would not mind :) ), just...
For example, this is a content of some txt file:
0.2 0.3 0.1 1.6
I'd like to load these numbers in some array and use them in a program. How do I do that?
Thanks!
Of course that I didn't mean PI with infinite number of digits (as I stated by "I know that computer calculated pi with much higher PRECISION, so how do I get, I don't know... 15 digits on the output...
I've started programming 1 week ago and I use win32 console for an output.
In program which calculates pi:
Code:
#include <iostream>
#include <math.h>
using namespace std;