General C++ Programming - February 2021 (Page 6)

Undefined reference to static vector
 
Hi all! First post here :) I'm trying to create a class that creates and stores objects of type T in a static vector, and returns a reference to that object so...
[2 replies] Last: Thanks for your help! It actually worked only when placed at the end o... (by Deanus94)
Printf: cannot convert ‘double*’ to ‘double (*)
 
Hey I am trying to take the inverse Fourier transform of complex output and print out in a 2D array. I wrote a printf function (that seems part of the error)...
[5 replies] Last: Thanks! This works, I am still learning to understand these error mess... (by JamieAl)
by doug4
What is the C++ Implementation for This?
 
To just put each column into an array: Pseudo code: Created 6 arrays (probably an array of arrays For each line in text file: Read 6 elements in each li...
[1 reply] : [has been asked and an answer provided at https://forums.codeguru.com/... (by seeplus)
by VoB
Unique pointers for a Binary Search Tree - Conceptual question
 
Hi everyone, I'm coding a binary search tree. I have a question about the following struct Node, which I have seen has been implemented this way: template <...
[7 replies] Last: Thanks @JLBorges for your confirmation. (by VoB)
How to Read and Store Literally Everything From and In/Out of a .txt File.
 
My objective is to have an array of structures that read literally everything from a .txt file.. That is; > The inner most structure variable is a charact...
[9 replies] Last: Sorry, i did not know such a question already existed here as i tried... (by TheIdeasMan)
by MA2121
New to C++ , Need Help Starting up program
 
movie theaters often make more money on food and drink sales than they do on ticket sales. One particular theater charges $10 for tickets to evening shows and j...
[1 reply] : Maybe you can ask your 'friend' -> https://www.cplusplus.com/forum/gen... (by salem c)
How to make it working?
 
#ifndef BSLAYER_CPP_ #define BSLAYER_CPP_ #include <GL/gl.h> #include <GL/glut.h> #include <iostream> #include<string> #include<cmath> // for basic math functi...
[11 replies] Last: It's rude that I don't know what you're talking about? I'm saying is ... (by Ganado)
by SSDEEZ
Passing a value from member function to non member function
 
I'm trying to write a program that manipulates the bits of integers in a vector. Down below you can see the GetSet() function and the ToBinary() function whi...
[4 replies] Last: Thank you @dutch got it working (by SSDEEZ)
by PeteDD
puzzling output uint16_t(128.00) returns 127
 
This really has me puzzled. Easiest to show with code and output. uint8_t numberOfBits = 8; Serial.print("pow(2,numberOfBits-1) = "); Serial.println (pow(...
[18 replies] Last: @PeteDD, mbozzi is the one who solved the mystery. The compiler gives ... (by dutch)
C++ programming question
 
Having trouble understanding this question and where to start, should be a relatively basic program I'm just new to programming. Any help is appreciated, thanks...
[1 reply] : That is simple math. How much is evening ticket + food together? How m... (by keskiverto)
g++.exe says undefined reference to static member variable
 
Hello, g++ doesn't seem to like this code: #include <iostream> class object { public: object() { obj_count += 1; std::cout << "Object ...
[2 replies] Last: Thanks! :P (by SirEnder125)
Function template specialization for literal strings
 
I have a class I am working on which let's me use the << operator on various types. I have defined the operator for integral types and for strings. I would like...
[5 replies] Last: Overload; as many times as you want. For example: struct logstm { ... (by JLBorges)
Compiling APR + LOG4CXX libraries
 
Hello! I'm starting to study again this wonderful programming language while being a Java Backend Developer. I was creating a simple c++ project and had the...
[3 replies] Last: Oooof! Those instructions are seriously outdated. Use Visual Studio 6... (by George P)
C++ class
 
Program only lets user to insert start date, output is completely wrong... #include <iostream> #include <cmath> using namespace std; class Dat...
[4 replies] Last: Ah. OK. Fixed by adding spaces before the ] (by seeplus)
Tracking User input and Case number user input
 
I am currently new to c++ and I was wondering what loop am I supposed to use in order to keep track on the total money amount of the user input and the total or...
[8 replies] Last: while(z!="n"||"N"); The conditional test is not correct. This nee... (by seeplus)
TBB algorithms load balance, paricularly parallel_for and parallel_for_each
 
Dear experts I sometimes think about load balance in TBB algorithms. I know TBB automatically balance task's loads for each thread. Here, what is difference b...
[1 reply] : I apologize for my uncertain question. Though not problems of load ba... (by Mitsuru)
Pointer usage in terms of cache-centric perspective
 
Dear experts, I am now studying some techniques relating to cache-centric programming. In traditional techniques in C++, handling of pointers is efficien...
[2 replies] Last: Dear jonnin I apologize for my ambiguous asking. What you said in th... (by Mitsuru)
February 2021 Pages: 1... 456
  Archived months: [jan2021] [mar2021]

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