General C++ Programming (Page 2)

Sorting question
hi , so I have to see my the input is sorted or not. here is my code. #include <iostream> using ...
[12 replies] Last: bool isSorted(const int list , int size); This hints (screams really... (by dhayden)
by yin
Program won't go inside of if statement
I tried debugging as well and outputted both the coin face and the toss selection, right before the ...
[1 reply] : srand() should only be used once at the beginning of main() For the t... (by seeplus)
by RicoJ
std::packaged_task constructor
It seems that there's a difference between () and = constructor (ctor) here. #include <functional...
[1 reply] : Line 7 performs copy-initialization while line 8 performs direct-initi... (by mbozzi)
by RicoJ
Ambiguous Function Call?
My understanding for function call sequence is: exact matching function > template function. Howev...
[10 replies] Last: Hi guys, Y'all have raised some very nice points! Yes, I did have #... (by RicoJ)
Can I Write iOS/Android Apps with C++?
I've finished a library of functions for calculating sunblock data, in C++. Is it possible to use my...
[3 replies] Last: Yes, although since running apps from the command line is not for ever... (by agent max)
Pixel Art
So, quick Q. How would I use Pixel Art in Visual Studio 2019? I would just want to do a few Animatio...
[4 replies] Last: Panda, your question is fine here, it's just that the answer is a lot ... (by Ganado)
How can i clean my messy cod
Hi everyone. Im a newbie, because of that i apolige. I have a messy code. I want to clean it and wan...
[19 replies] Last: Messy cod tartare with Mongolian tartar sauce made from tooth plaque. ... (by agent max)
Find word in a string array
So i have made a program that reads a file and stores the content in a wstring variable (Needs to be...
[5 replies] Last: Is this what you're after: #include <iostream> #include <fstream> #... (by seeplus)
copy constructor is deprecated if copy assignment operator or the destructor is user-declared ????
I do not understand how a copy ctor can be deprecated when either of the special functions mentioned...
[1 reply] : Currently the C++ compiler will write a copy constructor and copy ass... (by mbozzi)
Why Cant i used non-static variables for default argument assiment
struct X{ int var; void do_stuff(int i = var){...}//compilers want me to make var static }; ...
[7 replies] Last: @mbozzi oh man you are right Thanks!! (by masterAndreas)
Find the average exclude 2 largest and 2 smallest
int nValues = {182, 163, 174, 155, 168, 160, 159, 168, 172, 180, 173, 171, 177, 175, 16...
[6 replies] Last: Seeplus, in your call to std::accumulate, shouldn't nsize-2 be nsize-... (by seeplus)
How to establish UDP to pass argv[]
Hello, my friends. I want to establish UDP between client and server. On the client-side, I initiali...
[1 reply] : > if ((numbytes = sendto(sockfd, argv , strlen(argv ), 0 So instead, i... (by salem c)
How to construct a adj-matrix
#include<stdio.h> #include<string.h> #include <stdlib.h> # define MaxVNum 100 using namespace ...
[3 replies] Last: Thank you very much! (by James ByeBye)
C++ struct 2 dimensional array
i faced a problem when i want to let user store their name, age, favourite word and favourite number...
[4 replies] Last: You haven't explained why you think it needs to be a two dimensional a... (by AbstractionAnon)
How to write program that reads a file and prints lines of symbols based on its contents?
I'm a beginner and am working on an assignment with the following prompt: "Write a program to read f...
[3 replies] Last: #include <iostream> #include <fstream> using namespace std; struct P... (by lastchance)
Makefile assistance
I'm having issue compile with make using a Makefile and g++. I have a simple header and source file ...
[2 replies] Last: Would you mind providing an example? Edit: Just did a test run, with ... (by lumbeezl)
Dev - C ++ - doubt in exercise C ++
The purpose of this system is to keep collectible items (books, CDs, DVDs and magazines), organized ...
[3 replies] Last: For me, it's always easiest to start with the data. Read the assignmen... (by dhayden)
having an issue
Working on an assignment for my C++ homework. Writing a loop that calls a function out of main in or...
[2 replies] Last: Sorry sort of new to this site. Also wow am I dumb. Thanks! (by idkwht2name)
How to construct an adj-list/adj-matrix from a txt file in c++
The input file like this (0 12 36.93222330340848) (2 8 785.7766177831124) I want to construct a weig...
[2 replies] Last: Thanks for your kindly help (by James ByeBye)
Algorithms with comparator
How can I make Coctail Sort with comporator? void CocktailSortTemplate(std::vector<int>& b, in...
[2 replies] Last: if( comp(c[i+1], c ) ) // c[i+1] < c thank (by alexandr2222)
Pages: 1234... 10
  Archived months: [feb2021]

Cannot post in this page. To post a new message, go to the first page.