General C++ Programming - October 2018 (Page 3)

How to use lambda expressions outside of a function
 
Hi, I am using lambda function inside of a funciton like the following code snippet and it compiles correctly. void TRibbon::CheckMissingThirdDigit(cons...
[2 replies] Last: If you want to declare it outside of the function then you can no long... (by tpb)
Repeating CRTP?
 
I am developing a series of "self aware" object classes that read input from various file formats (such as XML) to gather the data necessary to create the objec...
[3 replies] Last: when doing string lookups in a hash table. For this problem I suggest... (by coder777)
minimum/maximum selection- Need homework solution
 
Show us the code you've written. Tell us what the errors are. We'll help you to fix them. We're not just going to do your homework for you.
[6 replies] Last: I thought that one cannot trivially remove posts, if there are alread... (by MikeyBoy)
by rcx11
Global variable in anonymous namespace changes value without call to set()
 
I'm working on a program that utilizes a variety of measurable fluid properties. The imperical equations that governs their behavior were derived in a metric sy...
[12 replies] Last: Glad I could help. I hope I didn't seem annoyed. (by mbozzi)
how to use C++ language to compare Excel file online?
 
I would like to write a website that can compare 2 excel file online by using C++ language,the compare will be like giving people browse 2 file and compare the ...
[9 replies] Last: Are you using .NET? or native C++? As mentioned above, there are a fe... (by primem0ver)
by PacR
How to transform pointer array to smaller pointer array?
 
Hello im trying to run this code but i get error: cannot convert 'char*' to 'char (*) ' in initialization| in line 16 #include <iostream> using namespace std...
[16 replies] Last: #include <iostream> #include <string> #include <string_view> int mai... (by JLBorges)
Some help needed
 
#include <iostream> #include <iomanip> #include <ctime> using namespace std; int main() { const int rows = 10; const int colms = 10; ...
[2 replies] Last: Also, you should actually ask a question. An qualified plea for help p... (by TheIdeasMan)
summing odd cubed numbers and printing them
 
Hi, i cant figure out whats wrong with my code but i need to see the total sum of the odd integers cubed from number say 1 till x #include <iostream> #include...
[2 replies] Last: #include <iostream> using namespace std; int main() { unsigned N;... (by lastchance)
LNK2019 unresolved external symbol
 
I'm getting 65 errors on a file in a program I'm trying to compile. I've posted 7 of them below as they are the 7 that I'm getting on all the other files as we...
[13 replies] Last: For anyone reading this in the future I found the solution with some o... (by bishoposiris)
How can i have player two choose a random slot in tic tac toe
 
#include "pch.h" #include <iostream> #include <string> #include <ctime> using namespace std; //Array used to store data on the board char square = { 'o...
[2 replies] Last: Another way is, determining how many fields are empty and randomizing ... (by nuderobmonkey)
sorting algorithms- question
 
Can someone tell me who is the fastest mode to sort an array?? "Fastest" means to have the lowest complexity possible, with oder words, to have the lowest numbe...
[6 replies] Last: yes it is a excellent choice to use for big-O analysis practice. Som... (by jonnin)
Need help storing .dat file into struct
 
I need help with my program,the problem I am having with this code is that I cannot figure out how to get data from a .dat file, store it into a struct from a l...
[2 replies] Last: Please DON'T remove stuff from your question once you've received an a... (by MikeyBoy)
How To Find The Size Of An Array If We Are Talking About Pointers?
 
Hello Professionals, Good day. I would like to ask about my concern about pointers. I came across about this std::size function from which it helps me find the...
[2 replies] Last: If you use C-style arrays, and you want to dynamically allocate them, ... (by MikeyBoy)
How To Remove Repeated Values (For ith and jth index values)
 
Hello Professionals, Good day. I would like to ask how can I create my program more accurate in terms of finding (or saving) the important arrays/values. It's ...
[1 reply] : struct Point2{ double x, y; }; int bucket(const Point2 &a, int widt... (by helios)
by volang
Filesystem, handling files/records (1,2)
 
Hey. I created a table in mysql with 1000000 records / rows in it. My columns are "id (primary key, auto incr.)" And "quantity". When I request ALL records, ...
[22 replies] Last: But I am wrong about seeking the disk for the new value, it only chec... (by helios)
PLEASE HELP-can't find the soultion
 
//*********************** Preprocessor Directives ********************* #include <fstream> #include <iostream> #include <iomanip> #include <string> #includ...
[13 replies] Last: Thank you so much, that fixed it! I appreciate it immensely! Hopefully... (by kcattgirl)
strange behavior at switch directive
 
I'm wondering why at the below code within the switch directive the 'default' branch will executed at line 26. That should never happen if the input file suppli...
[3 replies] Last: Remember to change line 61 back. What you had was correct, the while(i... (by Cubbi)
template madness: Bug or misunderstanding scoping rules?
 
I am working on a project that stopped compiling properly after an unwanted compiler update (long story). I am using the latest Visual Studio C++ compiler (free...
[6 replies] Last: It boils down to: C++11 Draft Standard: 14.6.2 Dependent names 3. In ... (by tpb)
If-else-if statements and Logical Operators--Analysis
 
I NEED HELP!!! Consider the following program: // This program illustrates the use of logical operators // PLACE YOUR NAME HERE #include <iostre...
[4 replies] Last: its not even a code question to start. And this is a GREAT question, ... (by jonnin)
Whats the problem, me or the ide? (constructors)
 
Not sure if i'm getting crazy or visual studio needs a vacation. I've 2 classes: class a { public: a(b::vartype p) } class b ...
[8 replies] Last: the files are actually .cpp and .h as created by default from visual s... (by barnack)
October 2018 Pages: 12345... 10
  Archived months: [sep2018] [nov2018]

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