ynwqmv
debug*
Dm
I need a person debug my errors
Just send your problem to chat or to stackoverflow
JamesBond
I want that how to make an enemy chase the human player who is moving with keyboard in c++ on console
Pavel
I want that how to make an enemy chase the human player who is moving with keyboard in c++ on console
I think this question requires more information. What engine you use, do you want to calculate a difference that enemy should move each step when going directly towards a player or you want to write pathfinding that avoids obstacles, or game AI that switches between states? Also this chat may be not the best fit since it doesn't look like problem related to C++ (rather generic problem), you may try to check a game dev chat in telegram, e.g. from these guys: http://thedevs.network/
kunal
I want to learn how can I build my own software and games but coud'nt get any leads
𝔖𝔞𝔯𝔬
I want that how to make an enemy chase the human player who is moving with keyboard in c++ on console
Let’s just say that making up with this problems is your work as a developer But This is a common situation and probably someone else got a solution already Check google at first, stack overflow, ecc…
Nur Mohammad
How can i built up C or C++ programing???
Chat Boss
itsmanjeet sent a code, it has been re-uploaded as a file
itsmanjeet
itsmanjeet sent a code, it has been re-uploaded as a file
uh, ok, I need help in type_traits, i.e enable_if and is_convertible as per the code
Anonymous
Hello, I'm new here for learning c++
Elogio
Thanks
Ahesanali GS
How can we develop windows application using C Programming?
𝔖𝔞𝔯𝔬
And a lot of pain
Mohsen
How can we develop windows application using C Programming?
Standard C IO does the job perfectly fine
Hritik
https://pastebin.com/D43B7NXZ
Hritik
https://pastebin.com/D43B7NXZ
I am getting Abort signal from abort(3) (SIGABRT) in this code for the mentioned test case if anyone can help me with this please
Diego
hello guys i want to know how to do this: im new on this but i got an assignment were i have to make a program on the master (master) side with the primitives for communication in PVM and also have the command line as capture. all with linux and the program must be carried out on the slave side (slave) with the primitives of PVM, receiving the parameters, i have the code but i dont know how to run it on linux
Diego
sorry for my bad english, its not my native language
Diego
I just need to send a message from one terminal to another using master and slave
noalcoholatwork
https://pastebin.com/D43B7NXZ
Line 24, pass the DP vector by reference, you're passing it by value. It's getting copied everytime the recursive function is called. The could result in a memory limit exceed and/or time limit exceed.
Nada
Can someone recommend me the best data structure with cpp course ?
Acron
Cpp from beginner to advanced to learn from where
IDCAN
Sometimes I notice that C++ project has .cpp and .c files (also for headers .h and .hpp) What the reason to create different format files?
Jose
Sometimes I notice that C++ project has .cpp and .c files (also for headers .h and .hpp) What the reason to create different format files?
c files comes from c language. The compiler expects those files will be compiled as c, not as c++; the .hpp or h format extensions for headers are not relevant for the creation of applications nor libraries.
Jose
Compilers like gcc threat cpp files as C++, c files as C. Take care of it 😁
𝕷𝖔𝖗𝖊𝖓𝖟𝖔
Hi guys, I have a problem with ncurses libraries. So I must spawn a new terminal window in a signal Handler, and I was told that the ncurses functions are able to do that. Shame that they are blocking and generally non safe to use in signal handlers. So I looked up on the internet and found that the library PDCurses was made to be thread-safe. Is it true?
𝕷𝖔𝖗𝖊𝖓𝖟𝖔
Technically speaking, no io is signal safe
there is no way to make it safe in a signal handler? I made wgetch safe by using nodelay(), but I don't know how to make other things safe
/
Help i have an important question
/
Is it a good idea to devide a numer by two using bit shifts
⚛ Hz
Is it a good idea to devide a numer by two using bit shifts
no, compiler will do it automatically(where appropriate), please optimize for readability
Olivia
What left and right shift operater do?? >> And << do???
klimi
What left and right shift operater do?? >> And << do???
they shift bits, 111 << 1 => 1110 111 >> 1 => 11
Buffer
What left and right shift operater do?? >> And << do???
These operators basically shifts the binary bits to left/right accordingly. For eg. 5>>1 will give 2. This is bcz 101 is binary equivalent of 5 and upon shifting 1 bit to right of (101) it will become (10) which is nothing but 2. In general , lets say 8>>n = 8/(2^n) means upon shifting right by any number is equal to dividing that no. By 2^n. And left shifting means multiplying by 2^n.
Rocky
Recommend me a good source to learn C ? (Beginner)
mito
رغد🖤
Hello
رغد🖤
I need someone who expert in C++ i would really appreciate if someone help me😭😭
رغد🖤
Rocky
Check it out on YouTube channels
There are lot of them , can u recommend me a good one in YouTube?
رغد🖤
What left and right shift operater do?? >> And << do???
This for cout ←← it print sentences or whatever on the screen And this →→ for cin to inter anything from the user
رغد🖤
There are lot of them , can u recommend me a good one in YouTube?
I really would like to but i don't study c language but i learned a lot about c++ roll from them
رغد🖤
How do I turn the prescription from 0 to 100 to a binary bombers?
رغد🖤
The nombers "
klimi
amazing formating
Llll
Does any know how to get modules to work in vscode for MSVC? As in, import <iostream>?
Llll
I have the following flags set; /std:c++latest /experimental:module /ifcSearchDir /scanDependencies /internalPartition
Llll
But I keep getting the error message that import is not a template
/
help i am having a problem
/
i am creating classes in c++
Chat Boss
/ sent a code, it has been re-uploaded as a file
Chat Boss
/ sent a huge message, it has been re-uploaded as a file ```#include <iostream> #include <fstream> #include "src/STFile.hpp" using namespace std; int ma..
/
i get an error
/
undefined reference to `File::OpenFile(char*)'
/
but i have defined it in the header file and it is overriding a super class virtual method
/
undefined reference to `File::OpenFile(char*)'
no wait it in not overridden it in inherited
/
class File { public: std::ifstream file; int OpenFile(const char *fname); virtual void ProcessFile(); };
/
#include "File.hpp" class STFile : public File { public: void ProcessFile() override; };
/
why it says undefined reference
/
/ sent a code, it has been re-uploaded as a file
i am creating an instance of STFile in the main code here and than calling STFile.OpenFile
/
this is also the implementation: #include "File.hpp" #include <fstream> int File::OpenFile(const char *fname) { file.open(fname, std::ios::binary); if (file.is_open()) { return -1; } return 0; }
/
#include "STFile.hpp" #include <fstream> void STFile::ProcessFile() { }
Dm
Does any know how to get modules to work in vscode for MSVC? As in, import <iostream>?
what is your problem? Issue description. iostream is old library and you don't need latest std version of whatever
Anonymous
I have the following flags set; /std:c++latest /experimental:module /ifcSearchDir /scanDependencies /internalPartition
I don't use Visual Studio, but did you check if on the version you are using, std:c++latest refers to C++20. It is possible that you are using an older version of Visual Studio. Moreover from what I read in the past Microsoft did not support module header units for a long while. They instead went the way of creating a separate module named std and partitioned it into partition units like compat and so on. So Microsoft required users to use something like import std.core; or import std.compat and so on. The support for header units came a little later. It is possible that the version you are using didn't have this support. I am not sure though. Other compilers like GCC and Clang went in the other direction. They started supporting modules the easy way i.e. using header units and global module fragments but are yet to support "standard library as a modules feature". This is why Microsoft is well into C++23 support while GCC and Clang are still lagging behind with their C++20 implementation itself.
Anonymous
#include "File.hpp" class STFile : public File { public: void ProcessFile() override; };
. <- Have you included this file in the list of files to be compiled by compiler A common mistake most beginners make with C/C++ compilation is that they assume that when a CPP file includes a header file say a.h then the corresponding implementation file i.e. a.cpp is automatically compiled. This is not the case. If you have multiple CPP files, you have to specifically request the compiler to compile all of them
Stanislav
https://cmake.org/cmake/help/latest/command/target_sources.html#file-sets