Mar!o
I will look into some D projects.
Mar!o
I still see that Rust might be fast, but C/C++ with compiler attributes attribute((*)) will always be faster
Mar!o
I always want these attributes in Rust. When performance really matters I like to give the compiler more hints.
Anonymous
hello everyone available source code to compile for windows, is there anyone who can help?
DARONG
Write program in C that asks the user to enter 3 names and informs whether they are arranged in alphabetical order.
Anonymous
## Rules #pinned * You are not entitled to an answer, getting angry about not answered questions will get you warned. * Not checking your problem in google (or any other search engine) first will get you a warn. * Asking to solve an assignment/test/whatever without trying it first yourself will get you a warn or will get you BANNED. We won’t write a code for you, but we can push you forward and suggest something. * Before posting a long code snippet think twice and read the Resources section below. * No “best book” or “best youtube channel” requests, use /get cbook and /get cppbookguide chat commands. * No “best ide” requests, use /get ide chat command to see the suggestions. * Asking for something that is in the pinned message right after joining WILL GET YOU BANNED. * C/C++ discussion preffered (assembly also allowed), asking about other languages (or groups for other languages) right after joining will get you BANNED. * Reverse enginnering, hacking and related topics are allowed, but asking to hack facebook, instagram, etc. is NOT allowed. Also if you ask "how to become a hacker" and obviously have zero knowledge on anything related to that you may get warned or banned. * Legitimate requests for help on code and programming questions are welcome. A request is considered legitimate if it describes your problem, what you've done so far and what went wrong. Requests such as "write my program" or "do my homework" are never considered legitimate. Asking not legitimate questions will result in a warn or ban. See https://stackoverflow.com/help/mcve on how to write good questions. * Asking for book recommendations is ok, but "pls give pdf book" is not allowed, find books by yourself. Posting illegally copied books (or links to those books) is also not allowed and will get you BANNED. * Only English language is allowed, if you speak shitty English or don't understand anything in English YOU WILL BE BANNED. * A little bit of programming related memes, jokes, shitposting are allowed. * NSFW content (porn, nudity, etc.) is not allowed. * Spamming/advertising (job posts are also ads, so ask an admin before posting) will grant you a warning or an immediate ban if you do it right after joining. * Religion, politics and ideological topics are forbidden. * Long code snippets must be posted via a snippet website(links below), posting pictures of code and posting long snippets in the group is not allowed. * If you encounter a problem, while using dev C++ or turbo C/C++, you will not be helped, use another more modern IDE. * Don't post compiled executables, that is obviously a security risk. * Personal messages without asking beforehand are not allowed. * If you want to post a link or some article in this chat you will need an admin approval first ## Resources C/C++ group India: http://t.me/c_cpp_india About asking good questions: * [English](http://www.catb.org/esr/faqs/smart-questions.html) * [Translations](http://www.catb.org/esr/faqs/smart-questions.html#translations) For posting long code snippets: * [GitHub Gist](https://gist.github.com) * [Ubuntu Paste](https://paste.ubuntu.com/) * [Pastebin](https://pastebin.com) ## Reports If you notice any forbidden content, please use the /report command while responding to the offending post to report it to the admins.
Did u type diz?😏
Talula
Or sort and check if they are still in same pattern as they were entered.
Janko Ⓥ
Actually used Linux antivirus, ClamAV.
klimi
hm interesting
Marián
is there something like typeof in c++?
Marián
typeid?
Marián
decltype
thanksss
Nomid Íkorni-Sciurus
Nomid Íkorni-Sciurus
I have already said that, but: even for very skilled security analysts it is very difficult to analyze that kind of security.
Distac_221
#include <stdio.h> #include <sys/socket.h> #include <errno.h> #include <netdb.h> #include <string.h> #include <stdlib.h> int main(int argc, char **argv){ struct hostent *host; int err, i, sock, start, end; char hostname[100]; struct sockaddr_in sa; printf("Enter hostname or IP:"); gets(hostname); printf("\n"); printf("Enter start port number: "); scanf("%d", &start); printf("\n"); printf("Enter end port number: "); scanf("%d", &end); memcpy((char*)&sa, "", sizeof sa); sa.sin_family = AF_INET; if(isdigit(hostname[0])){ sa.sin_addr.s_addr = inet_addr(hostname); } else if ( (host = gethostbyname(hostname)) != 0){ memcpy((char*)&sa.sin_addr, (char*) host->h_addr, sizeof sa.sin_addr); } else { herror(hostname); exit(2); } for(i = start; i <= end; i++){ printf("Scanning port %i\n",i); sa.sin_port = htons(i); sock = socket(AF_INET, SOCK_STREAM, 0); if(socket < 0){ exit(1); } err = connect(sock, (struct sockaddr*)&sa, sizeof sa);
Distac_221
if (err < 0){ fflush(stdout); } else { printf("Port %i is open\n", i); } close(sock); } fflush(stdout); return 0; }
Distac_221
i have been make some simple port scanner and im add input port from 1-65536 but i cannot see which port is open
Distac_221
because of the limit on terminal screen..so if theres a report that show which open and not it will be great
Distac_221
thank you
Anonymous
hello all, I've an .EXE which is packed with THEMIDA's latest version i.e. version 3. Can someone unpack the exe ? I can pay for it
Ammar
I once wrote this scanner: https://gist.githubusercontent.com/ammarfaizi2/8078474f9a925367921766e2773db4fb/raw/db3081c325e9f40f697ab78a8c1a43fbc86abcfc/tcp_scan_fbtor.c If you see the port is open, just create a filename with the port number.
Distac_221
if i wanna to compile it for arduino do i have to make my own library??
Ammar
if i wanna to compile it for arduino do i have to make my own library??
Damn, I don't think this work is suitable for Arduino. But anyway, I don't code for Arduino device, so I don't know.
Distac_221
maybe i should buy raspberry pi
Ammar
maybe i should buy raspberry pi
Yeah, maybe you should.
Distac_221
hmm thanks
.
Any one who is expert in Data structures
.
Best resources to learn data structures?
Hanz
Best resources to learn data structures?
"* No “best book” or “best youtube channel” requests, use /get cbook and /get cppbookguide chat commands."
Anonymous
/get cbook
Anonymous
/get cppbookguide
net
/get
Stefano
Rega chi mi aiuta a fare un compito di informatica
Stefano
Per favore aiutatemi altrimenti prendo due
Stefano
guys I'm Italian sorry but you have to use the translator
Ammar
guys I'm Italian sorry but you have to use the translator
No, you have to use English, you are the one who should use translator to communicate in this group. Because this is not an Italian group.
Stefano
Please
Stefano
ok guys sorry so it means that I will have to take a two thanks anyway😓
Anonymous
hello all, I've an .EXE which is packed with THEMIDA's latest version i.e. version 3. Can someone unpack the exe ? I can pay for it
Merve
Selam millet
Merve
Hi all
Merve
ı have same error at visual studio, can u help me pleaseee
Merve
"this application has failed to start because the application configuration is incorrect"
Anonymous
Selam millet
/warn non English
Merve
yes sorry
Wisenky
my source tree seems like TREE -build (cmake things) -external -SDL2 -include -lib -x86 -x64 -src -main.cpp CMakeLists.txt and in CMakeLists.txt cmake_minimum_required(VERSION 3.7) project(Gayming VERSION 0.1.0) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED YES) find_package(SDL2 REQUIRED COMPONENTS main) set(SDL_DIR "${CMAKE_SOURCE_DIR}/external/SDL2") set(SDL_INC_DIR "${SDL_DIR}/include") set(SDL_LIB_DIR "${SDL_DIR}/lib") # Support both 32 and 64 bit builds if (${CMAKE_SIZEOF_VOID_P} MATCHES 8) set(SDL_LIB "${SDL_DIR}/lib/x64/SDL2main.lib; ${SDL_DIR}/lib/x64/SDL2.lib") else () set(SDL_LIB "${SDL_DIR}/lib/x86/SDL2main.lib; ${SDL_DIR}/lib/x86/SDL2.lib") endif () # link dependencies include_directories(${SDL_INC_DIR}) target_link_libraries(${PROJECT_NAME} ${SDL_LIB}) # Project files and linking add_executable(${PROJECT_NAME} src/main.cpp) It brings me an error CMake Error at CMakeLists.txt:24 (target_link_libraries):Cannot specify link libraries for target "Gayming" which is not built by this project.CMake (target_link_libraries) that I couldnt understand
OnePunchMan
can anybody suggest project idea. (can be complete within 1 to 2 weeks) That Can Cover C++,multithreading, some oop.
Anonymous
Games are always fun.
Anonymous
if you do sth. simple
Anonymous
Hello can someone please explain this program
Anonymous
#include <cmath> #include <iostream> using namespace std; int main() { int num, originalNum, remainder, n = 0, result = 0, power; cout << "Enter an integer: "; cin >> num; originalNum = num; while (originalNum != 0) { originalNum /= 10; ++n; } originalNum = num; while (originalNum != 0) { remainder = originalNum % 10; // pow() returns a double value // round() returns the equivalent int power = round(pow(remainder, n)); result += power; originalNum /= 10; } if (result == num) cout << num << " is an Armstrong number."; else cout << num << " is not an Armstrong number."; return 0; }
Bumpy
Hello eve, I have two files (hpp,cpp) In the hpp files I declared a overloading function and I want to implement them on the cpp file.
Bumpy
When I’m compile I get an error of all my functions : “must be a unary/binary operator”
Bumpy
Anyone know why?
Bumpy
friend NumberWithUnits operator+(const NumberWithUnits& n1, const NumberWithUnits& n2); friend NumberWithUnits operator+(const NumberWithUnits& n, double a); friend NumberWithUnits operator+=(NumberWithUnits& n1, const NumberWithUnits& n2); friend NumberWithUnits operator-(const NumberWithUnits& n1, const NumberWithUnits& n2); friend NumberWithUnits operator-(const NumberWithUnits& n); friend NumberWithUnits operator-=(NumberWithUnits& n1, const NumberWithUnits& n2);
Bumpy
this is the declaration on the hpp file . (without friend it doesnt compile)
Janko Ⓥ
Of course it can, just move printf() to the end of the first loop.
Janko Ⓥ
It's just an exercise.
Hariyana Grande
Of course it can, just move printf() to the end of the first loop.
ok i did but its not working could you tell me more how to do it
Hariyana Grande
here this is what i did -
Janko Ⓥ
Hold up
Janko Ⓥ
Nevermind.
Hariyana Grande
what ?
Anonymous
Thank you!
Hariyana Grande
Hold up
did i do something dumb in prgram?
Hariyana Grande
No, I did
i got the answer - you cant do that in one loop unless you want input and output on same line.thank u.
Janko Ⓥ
Yeah, I thought that's what you wanted, so I said it's possible. But realised it's not what you meant
Ausir
What does int (*var)[size] mean?