Mar!o
It depends on your usage. OpenGL is simpler than Direct3D11
Mar!o
And D3D12 is even more complex
Anonymous
D3D12 is a very different API (more similar to Vulkan), but D3D11 has a nice API, slightly harder than OpenGL though
Anonymous
basically, would you recommend me DirectX over opengl for windows? Are the debugging tools, performance etc.. better?
Mar!o
Yeah.
Mar!o
Better Visual Studio integration too
Anonymous
alright
Anonymous
and if I'd make a game for Linux later, which opengl version would you recommend me? I think 2.1 is fine for most PCs
Mar!o
Yeah it's fine if you need more feature use OpenGL 3 or 4
Anonymous
I'm still thinking what API should I use (actually, I'm still undecided if make my small game cross platform)
Anonymous
since I mainly use Windows
Anonymous
I'll see, thanks anyways
Mar!o
No problem
Pablo
Guys, is it possible to include a lot of libraries at the same line? Something similar to this: #include <math.h>, <stdio.h>
Anonymous
wait, it is?
Anonymous
thanks for the fun fact heh
mito
Guys, is it possible to include a lot of libraries at the same line? Something similar to this: #include <math.h>, <stdio.h>
No, you can't I think.. The least you can do is, make a new header file and include all the headers you want there, and then including it in the file you want.
Anonymous
oh
Pablo
Yup
How?
Ashish
How?
I tried to run the code and i get no error
Anonymous
try using the libs
Pablo
Thanks
Anonymous
why do i get No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting even tho i have https://gist.github.com/mgood7123/e20dab587ce1bb61b6bddc64cb963e58
Sandeep
A is an array...now I can pass A+mid1 as a parameter...
Sandeep
A is an array...now I can pass A+mid1 as a parameter...
How do I acheive the same using vectors
Sandeep
Sandeep
I need to pass rest of the array
Sandeep
Like..from mid1
Ravi
Again, A.begin()+mid1+1, A.end()
Sandeep
Again, A.begin()+mid1+1, A.end()
So I need to pass two values??
Ravi
from A.begin()+mid1+1
Ravi
If to is required then A.end()
Fatih
Why do you flush stdin? You need to flush stdout.
Thank you. I have solved the problem
Paul Pogba
hello guys
Paul Pogba
please need help
Paul Pogba
i want to crypt password on a c++ program
Paul Pogba
i want the password to crypt itself as the user is typing it 😩🙏🏼
klimi
i want the password to crypt itself as the user is typing it 😩🙏🏼
what do you mean crpyt itself as the user is typing? like it wouldn't show the characters? or that you would preview the generated hash / data?
klimi
then you will need to controll the terminal, which you will ask to not print the characters, and you will have tu replace them by asterics
klimi
it should display asterics while typing
https://stackoverflow.com/questions/25990966/how-to-show-enter-password-in-the-form-of-asterisks-on-terminal https://stackoverflow.com/questions/6856635/hide-password-input-on-terminal http://www.cplusplus.com/articles/E6vU7k9E/
Anonymous
i cannot figure out how to call ObjectiveC/Swift from C++ ;-; every guide seems to be about calling C++ from ObjectiveC/Swift instead ;-;
Anonymous
it should display asterics while typing
or just not display anything typed at all like most pasword prompts do
Anonymous
#include <iostream> using namespace std; int main() { int width, lngth, area, peri; cout << "\n\n Find the Area and Perimeter of a Rectangle :\n"; cout << "-------------------------------------------------\n"; cout<<" Input the length of the rectangle : "; cin>>lngth; cout<<" Input the width of the rectangle : "; cin>>width; area=(lngth*width); peri=2*(lngth+width); cout<<" The area of the rectangle is : "<< area << endl; cout<<" The perimeter of the rectangle is : "<< peri << endl; cout << endl; return 0; }
Anonymous
Is that code without using class
Anonymous
?
Anonymous
Yes
Anonymous
Thx
Lassie D
#include<stdio.h> int main() {    char str_message[500], ch;   int j, key;    printf("Enter a message to encrypt: ");     scanf("%s",str_message);    printf("Enter the key: ");    scanf("%d", &key);    for(j = 0; str_message[j] != '\0'; ++j){     ch = str_message[j];      if(ch >= 'a' && ch <= 'z'){        ch = ch + key;        if(ch > 'z'){          ch = ch - 'z' + 'a' - 1;        }        str_message[j] = ch;      }      else if(ch >= 'A' && ch <= 'Z'){        ch = ch + key;        if(ch > 'Z'){          ch = ch - 'Z' + 'A' - 1;        }       str_message[j] = ch;      }    }    printf("Encrypted message: %s", str_message);    return 0; }
Lassie D
Please guys, can you identify the fault in this? I want to write a program to decode and caesar cipher in C
Anonymous
or just encrypt it by, say adding 5 to every value 🙂
Anonymous
Please guys, can you identify the fault in this? I want to write a program to decode and caesar cipher in C
there is no such thing as a "fault" in encryption, only a "weak encryption" eg an encryption that can easily be broken/decrypted eg encryption via reversal can be incredibly weak if you know that reversal is the method used for encryption, thus the fault would be using reversal for encryption
Anonymous
eg plain 1234 encrypted 4321
Anonymous
tho in that case, there CAN be a fault in how a certain encryption is being implemented
Anonymous
eg if your writing your own 256 bit encryption algorithm then there WILL be faults at first (because 256 is very strong and takes years to brute force/break), and this would be very complex to implement (probably)
Anonymous
if your using an existing 256 bit encryption library than there will probably be zero faults if the library is widely used and highly recommended for use in encryption software
Anonymous
Need docs/ explanation for vector syntax like this: vector< vector<int>> dp(1 << n, vector<int>(n, -1)); like, it's a 2D array —> initialized with 1<<n, but cols are initialised with vector<int>(n, -1) ? :/
Anonymous
docs?
Anonymous
docs?
documentations and syntax explanations
Anonymous
for these kinda usage
Anonymous
-1 is signed, so will be INT_MAX+1
Anonymous
if that helps
Vlad
-1 is signed, so will be INT_MAX+1
Lol it's totally wrong
Vlad
-1 is UINT_MAX
Anonymous
-1 is signed, so will be INT_MAX+1
hein not that i want to see some initializations like these with explanations ik it's -1
Anonymous
and why INT_MAX?
Anonymous
anyway thats not the question, i am getting confused in these kinda initialsation