General C++ Programming - May 2020 (Page 7)

What COM(component object model) aimed at?
 
I sometimes think about what windows c++ library technique, COM(component object model), designed and implemented for? Of course, I understand its importance. ...
[6 replies] Last: Performance isn't specifically caused by COM, but COM is a product of ... (by kbw)
How can I solve this without using map method?
 
What have you managed to achieve so far? And no, we're not in the business of entering competitions by proxy. Oh, and now the OP has buggered off, the link to...
[12 replies] Last: I was hoping lastchance might take a gander at this. Nicely done! That... (by dutch)
STL
 
I have this question from one of my assignments int main(int argv, char* argc ) { int i; list<int> l; do { cin >> i; l.push_back(i); } while (i!=0); return 0; ...
[6 replies] Last: Thank you very much, problem solved (by QueenJJ)
by OYS
Exception thrown at 0x00509159 in FA.exe: 0xC0000005: Access violation reading location 0x0040400C.
 
This is my typedef struct typedef struct { char date ; double price; double SMA; double EMA; }DATA; This is the function that has error. When i used debu...
[5 replies] Last: Dunno - is this what you want? for (int i = j; i < j + time_frame; i... (by salem c)
by doggi
Create object using unique_ptr
 
I have enum class with 3 types of objects. Need to create an appropriate type of object using unique_ptr. But compiler throws lots of errors. Maybe I am using ...
[7 replies] Last: Okay, doug4, I will try (by doggi)
what is the type of the label pointing to statement
 
This morning I come out with this question, what is the type of the label pointing to statement ? int main( int argc, char **argv ) { int a = 0; in...
[2 replies] Last: Such ! Amazing !!! I almost gave up to find out the way to achieve th... (by GodGnidoc)
C++ design after C++11
 
Dear experts As you know, C++ has developed to provide standard ways in multi paradigm(generic, object-oriented, functional,concurrency etc), particularly af...
[3 replies] Last: Dear kbw & Furry Guy Thank you for your replies. Indeed, I learned t... (by Mitsuru)
If you run my code, what is your output ?
 
``` // Created by Paul A. Gureghian in May 2020. // //This C program takes two integers and calculates the sum. // // Start of program. // // Import lib...
[1 reply] : Do you realize that you must enter "Enter 1'st integer:" along with yo... (by jlb)
concatenate 2 integers and make 3rd integer
 
I have 2 integers 1 and 001 how do i make it 1001? Tried to convert both numbers into string using to_string and concatenated and again did stoi but this return...
[12 replies] Last: Isn't that just int test = 1 * 1000 + x; ?? (by dhayden)
C++ Coding Errors
 
Hello, I am new to this forum and trying to teach myself how to code using C++. I don´t know why when I try to build this code with Visual Studio 2019 it retur...
[1 reply] : Please edit your post and add [co de] tags around your code. That's ... (by helios)
C++17 Temporary Materialization Efficiency
 
I ran the following test on Godbolt: https://godbolt.org/z/WtNfn7 As you can see, the C++17 compiled version is 319 lines of assembly, while the C++14/C++11...
[2 replies] Last: Ah yeah, that reduced the size of both to 19 lines (by TheToaster)
need help to get program to load/read txt file
 
Below is the code I have and i am in need of help getting program to load a text file so the user can take exam and then display results. I think once if figure...
[4 replies] Last: @lastchance, I see. I found it here also http://www.cplusplus.com/foru... (by thmm)
C++ help
 
Hi! I need some help some help with some labs. I’m new here so I’m not entirely sure that I’m able to attach pictures for you guys to see the questions. I...
[1 reply] : You can post links to pictures if you must. Pasted text is always best... (by dutch)
Adding two numbers in modern C++
 
This morning a friend asked me how to add two numbers in modern C++. First I wanted to write that you do it as in old C++, but after a little thinking I came u...
[6 replies] Last: #include <iostream> #include <cstdint> using int32 = std::int32_t; ... (by dutch)
What is the difference between python and arduino programming?
 
I am a Python programmer and want to learn Arduino programming so want to know what are the main differences between Python and Arduino C++ programming? Is Ard...
[2 replies] Last: @Orangutango The short answer is try both. C/C++ as Arduino uses it i... (by againtry)
Why can't I declare string inside a public class?
 
#ifndef PLAYER_H #define PLAYER_H #include <iostream> #include <string> using namespace std; class Player { public: string player1; //Where is...
[9 replies] Last: @MikeyBoy I fixed the problem, I was using the same header in another ... (by Validity)
Beginner C++ Magic Square Input Check with limits...
 
Help ! I am still a beginner in C++, and we were tasked with a final project on magic square. The objective is to have the program accept values in a form o...
[no replies]
by mbozzi
Should I create problem-specific type aliases?
 
Frequently, I settle for a general-purpose type when I really want a problem specific one. For example, I might choose int when I really want an id_number ...
[4 replies] Last: At work, we have "jobs" and "users" and "documents" etc. They're all ... (by mbozzi)
Confusion about an answer on SO
 
Hey guys, so I'm reading this post on SO - https://stackoverflow.com/questions/9152890/what-would-cause-an-algorithm-to-have-olog-n-complexity it is the f...
[14 replies] Last: The notation isn't really important. Notice for example that in the pr... (by helios)
Removing only a single duplicate element from a vector of objects
 
So I have been trying to design combat mechanics in a text based RPG project, and currently I have a player class with an inventory that is a vector of shared p...
[3 replies] Last: one of a set of matching types The find_if returns iterator to one o... (by keskiverto)
May 2020 Pages: 1... 56789
  Archived months: [apr2020] [jun2020]

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