General C++ Programming - July 2021 (Page 3)

How can i get a array in another class
 
Hello , I created a public array in class A . I want to get this array in class B . so this is ...
[10 replies] Last: You're welcome! (by MikeyBoy)
converting morse code to english
 
Hey guys, i am new to programming and trying to write a program that converts english to morse and v...
[6 replies] Last: Don't worry about it, efficient comes with time and deeper study. The... (by jonnin)
how I can get the variable from a for loop for each iteration
 
Hello , I am really new in C++ development. I need to get the variable of each iteration in a fo...
[8 replies] Last: #include <iostream> int main() { int var1{0}; int var2{0}; ... (by againtry)
create function to retrive data from CSV file
 
Hello , Currently i work on a Qt Application using C++. I am really new in c++ development. I upl...
[6 replies] Last: To extract just one element from a csv file, perhaps: #include <fst... (by seeplus)
E1696 E0020 errors using VS (1,2,3)
 
Hi All I am getting below errors while trying to compile the code in vs. How can I fix it? Should I...
[48 replies] Last: There are too many things possibly you can do for anyone to keep answe... (by kbw)
by Cplusc
error LNK2019: unresolved external symbol "public
 
I am trying to build a class for mpi send and receive. I made this class without using template. now...
[9 replies] Last: yes it's returning the type if I defined something like const char* x=... (by Cplusc)
by Cplusc
Flatten class and send with mpi
 
let say I have a header file like below. I have problem in send buffer.why I can't write &iterator....
[10 replies] Last: thanks for your help. yes, the function is this,https://www.mpich.org... (by Cplusc)
push_back() a vector into a 3D vector causes memory leak
 
I will try to explain the issue as best as I can. First I will present the code: for (int i=0; i<...
[19 replies] Last: For test code to try to identify the issue, consider: #include <vec... (by seeplus)
by RicoJ
What is this syntax for initializing 2D array?
 
This is technically C and I understand this is a common way to initialize a 2D array: const char*...
[6 replies] Last: Thanks @mbozzi, this is designated initialization: https://gcc.gnu.org... (by RicoJ)
by Cplusc
Sending vector of vector with mpi
 
I want to send the vector<vector<int>> vec from processor 1 to processor 2. Let say the vec {{1,2,4}...
[6 replies] Last: [quote=resabzr]I mean if before flattening we use i,j to access data i... (by lastchance)
What is Projection as in the ranges library?
 
Projection is defined as a mapping of a set into a subset.In the ranges library the std::ranges::sor...
[2 replies] Last: I think it comes from the relational world as in: Projections - The... (by JUANDENT)
Writing integers to binary files
 
Hello all, I am currently working on a program that reads in from a txt file and outputs data to a b...
[10 replies] Last: It says 'int' in the type, one might reasonably expect it to behave i... (by seeplus)
std::function issue C2664
 
Hello Could I request a help in following problem? I have a base class called cParent. It's c...
[2 replies] Last: Sure. I will The thing is, I have 5 classes.. and all of them have... (by nidhinWilliam)
by Cplusc
MPI SEND and RECEIVE
 
let say we have a vector of vector of vector of type integer. The out vector is referring to the num...
[8 replies] Last: @helios No (by Cplusc)
by Cplusc
uninitialized local variable (1,2)
 
lets say I have a text file which contains a mesh properties. I define a class named Mesh which read...
[22 replies] Last: @resabzr, You don't need your own Vector class. A normal std::vector h... (by lastchance)
by zapshe
default constructor does not exist in the class
 
You have a constructor which takes two arguments, two integers. You have NO constructor that takes ...
[2 replies] Last: Into the abyss. (by zapshe)
my template code seems unusable
 
I describe the template class as follows for a stack, Which uses a specific type to generalize the c...
[14 replies] Last: Memory leak. Correct. Thanks. I was in too much of a hurry...... Mo... (by seeplus)
Need help on my assignment
 
Create the logic for the dice game Twig, in which a player can compete with the computer. The object...
[4 replies] Last: is it possible to loop a random result and accummulate at the same ti... (by kbw)
by Cplusc
getline is not working
 
I have a class named Mesh like this #ifndef _MESH_H_ #define _MESH_H_ #include "includes.h" #incl...
[8 replies] Last: Thanks for your answer (by Cplusc)
Test Scores
 
Hello, I need help writing a program that reads in 10 test scores. The test scores should be intege...
[5 replies] Last: scores = [ int( s ) for s in input( 'Enter test scores: ' ).split() ]... (by lastchance)
July 2021 Pages: 12345
  Archived months: [jun2021] [aug2021]

This is an archived page. To post a new message, go to the current page.