Etaoin
in my case I am maintaining some tree-structured data structure
Etaoin
so pointers must be used
Ludovic 'Archivist'
Etaoin
Ludovic 'Archivist'
Why would you get an address if you can just handle it with less error prone references?
Etaoin
that statistics is only an simplier example
Ludovic 'Archivist'
Etaoin
what I want to do is http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.87.9754&rep=rep1&type=pdf and I don't recommend any of you to read this
Ludovic 'Archivist'
Ludovic 'Archivist'
It is like a manual of impractical solutions to solved problems 😅
Ludovic 'Archivist'
Anonymous
#include "gmp.h" #include <stdio.h> #include <stdlib.h> #include <assert.h> void fact(int n){ int i; mpz_t p; mpz_init_set_ui(p,1); for (i=1; i <= n ; ++i){ mpz_mul_ui(p,p,i); } printf ("%d! = ", n); mpz_out_str(stdout,10,p); mpz_clear(p); } int main(int argc, char * argv[]){ int n; if (argc <= 1){ printf ("Usage: %s <number> \n", argv[0]); return 2; } n = atoi(argv[1]); assert( n >= 0); fact(n); return 1; }
Anonymous
Does this works?
Ludovic 'Archivist'
Anonymous
#include "gmp.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
void fact(int n)
{
int i; mpz_t p;
mpz_init_set_ui(p,1);
for (i=1; i <= n ; ++i){
mpz_mul_ui(p,p,i);
}
printf ("%d! = ", n); mpz_out_str(stdout,10,p); mpz_clear(p);
}
int main(int argc, char * argv[]){
int n; if (argc <= 1)
{
printf ("Usage: %s <number> \n", argv[0]); return 2;
} n = atoi(argv[1]);
assert( n >= 0);
fact(n);
return 1;
}
Anonymous
Does this works
Anonymous
?
Ludovic 'Archivist'
Zeus
Hello developers..
Zeus
I need help!😂
Zeus
#include<stdio.h>
#include<string.h>
#include<iostream>
using namespace std;
void NthPrime(int input1)
{
int count,a=1,*prime;
for(int i=3;i<=1000;i++)
{
count = 0;
for(int j=2;j<=1000;j++)
{
if(i%j==0)
{
count ++;
}
}
if(count == 1)
{
prime[a]=i;
a++;
}
}
cout<<prime[input1];
}
int main()
{
NthPrime(5);
}
Zeus
can anyone tell me what's wrong with this code?
Zeus
having this error while am running it
Anonymous
Ariana
Ariana
btw put code in monospace
Elbek
Hello please help me I want to run project from VS 2013 but it doesn't
because error MSB4175
how I can fix it
Elbek
?
MᏫᎻᎯᎷᎷᎬᎠ
mark
MᏫᎻᎯᎷᎷᎬᎠ
klimi
Anonymous
Hy guys..Is there any easy way to print every type of pattern
S.
"every type of pattern" what's this?
Anonymous
Is that star pattern
Anonymous
Yes star and number patterns
Anonymous
Like
1
12
123
123
12
1
*
*
***
S.
then there's no easy way, i guess
S.
what have you tried so far
Anonymous
Actually I just wanna learn how to frame them... Means how to arrange in a given position..
S.
print necessary spaces before them
Elbek
Google it
I have googled it but didn't find any solution
S.
Well i googled and found many solution. You could've said you've tried them but they didn't work
S.
maybe the simplest solution for you is to upgrade your vs
Elbek
Anonymous
https://www.phoronix.com/scan.php?page=article&item=gcc9-core9-tuning&num=1
Anonymous
BinaryByter
Mihail
/report
Death Killer
Hi
Death Killer
I c++ oop concepts have a great variety
Death Killer
I want to learn things in great depth and explore all possibilities
Death Killer
Which book you would suggest
Mihail
Best way to do that would be by actually doing it
Death Killer
But i will read and implement
Mihail
You don't need to read much
Mihail
And all the reading you'll need you can find online
Mihail
All the theory a book will give you, practice will give you but faster and in a way where you'd actually be able to use it
BinaryByter
i kinda agree but dissagree
BinaryByter
for learning, use practice
BinaryByter
for getting new ideas on how to pervert oop, read books
Victor
sl command has been over-played 😂
Bruce
void main reduces one step of programme i.e no need to type return 0,rather than int main.then why many people use int main in c programme?
BinaryByter
you dont have to return from int main
BinaryByter
+ in linux, what you return is the exit status
Ariana
Ariana
exit takes an argument
Ariana
Ariana
Bruce
Ariana
So it just defaults to 0, which isn’t always what you want
Ariana