
please wait
by KennyV2
I made a cool calculator
|
Hey, I'm currently taking a introductory class for C++, I feel proud that I wrote a calculator program. Is there anything I can do to make my calculator more co... |
Sep 30, 2021 at 11:58pm
[7 replies] Last: that is correct, the human has to mentally adjust the input. you get ... (by jonnin)
|
C++ Help Finding Occurrences of letter d |
Have to do this and not sure how to do it. Need help with doing it. Instructions: Query the user for the name of a file and then count and report the number... |
Sep 30, 2021 at 4:27pm
[4 replies] Last: The only real difference is that I count all the words and those start... (by seeplus)
|
by KENnIG1591
c++ Temperature bar chart (1,2)
|
Can anyone help me out with this problem This is what I have so far: #include <iostream> #include <string> #include <iomanip> #include <fstream> #inc... |
Sep 30, 2021 at 12:54pm
[32 replies] Last: For a vertical chart, perhaps: #include <iostream> #include <string... (by seeplus)
|
by denver2020
const member fn
|
I got a doubt with const signature from the below code. can anyone help me correct my understanding here? Consider the following class. class ABC {... |
Sep 30, 2021 at 9:58am
[14 replies] Last: Of course. You have valid code when you don't try to make static membe... (by keskiverto)
|
by denver2020
virtual function performance (1,2)
|
I am seeing a performance issue with virtual functions and it impacts every function call with virtual functions. why am i seeing virtual fns execute slower? Is... |
Sep 29, 2021 at 5:42pm
[25 replies] Last: Your closing points seem fine, but I thought I'd add this to the inqui... (by Niccolo)
|
by denver2020
PURE VIRTUAL FN (1,2)
|
Is below code the right way to overload a pure virtual function? Can overload be only done if I am able to override it? struct I { virtual void func3()... |
Sep 29, 2021 at 10:59am
[31 replies] Last: [quote=denver2020]All I am trying to figure out here is that if its a ... (by MikeyBoy)
|
by prog2222
Sprcificator %02X
|
Can I get this line in C++? for (i = 0; i < 8; i++) printf("%02X", key ); |
Sep 29, 2021 at 10:58am
[3 replies] Last: See my edited post above. (by seeplus)
|
by jabeh
C++ Coding that create a function that open the contact file using struct, pointers, array, and classes
|
#include <iostream> #include <fstream> #include <string> using namespace std; void printContacts(string user_id , float contact_with , float contact_st... |
Sep 29, 2021 at 9:08am
[6 replies] Last: Very similar to this post here http://www.cplusplus.com/forum/beginner... (by seeplus)
|
I have a member function of class SparceMatrixStruct which should return a vector. |
I have a member function of class SparceMatrixStruct which should return a vector. std::vector<size_t>SparceMatrixStruct::col_ind(VecVecIdx_t &refined_node_con... |
Sep 28, 2021 at 10:35am
[1 reply] : > col_ind=object.col_ind_; 1. Make your member variables private, so y... (by salem c)
|
by prog2222
A5 / 2
|
Where can I find realization of A5 / 2. All I have is below. But as I understand it is A5/1: #include <stdio.h> /* Masks for the three shift registers ... |
Sep 28, 2021 at 8:24am
[1 reply] : https://cryptome.org/gsm-a512.htm It doesn't appear to have an auspic... (by lastchance)
|
by mzimmers
best way to define/declare global data
|
Hi all - I'm maintaining a C program (have added some C++ to it). One source file defines an array of data that was local to that module. I need to expose th... |
Sep 28, 2021 at 6:28am
[2 replies] Last: That is what a header file is for: globals.hpp #ifndef GLOBALS_HPP ... (by Duthomhas)
|
by TinnyMintz
Can someone explain how the output is what it is?
|
So I have the this code: #include<iostream> using namespace std; void fun(int x) { if(x > 1) { cout << --x << " "; fun(--x); ... |
Sep 28, 2021 at 4:08am
[3 replies] Last: Add print statements and you will see it. #include<iostream> using... (by jonnin)
|
by TinnyMintz
How do you come to the output?
|
Code: void createList(node*& head) { for (int i = 5; i < 20; i++) { bool condition = true; for (int j = 2; j <= i / 2; ++j) ... |
Sep 27, 2021 at 11:34pm
[1 reply] : It gets the prime numbers between 5 and 20 and sequentially prepends t... (by helios)
|
New to C++ could use some help |
How do businesses like Amazon™ calculate shipping? The cost of shipping can include the size and weight of an item, where it’s coming from, where it’s goi... |
Sep 27, 2021 at 11:27pm
[3 replies] Last: thank you for the link on how to use code tags, sorry about not using ... (by closed account iN72160M)
|
Question about linked lists |
Lets say I have a linked list with a struct defined like this. struct LList{ int data; struct LList *NextList; int data2; }; When I allocate memory... |
Sep 27, 2021 at 3:10pm
[3 replies] Last: I got nothing on how that could be happening. (by jonnin)
|
help with cin lines in switch statement |
Can anyone help and explain to me how to correctly include cin lines? My current code does not have any errors but it won't take any user input. I want to be... |
Sep 27, 2021 at 12:53pm
[13 replies] Last: @seeplus Thank you so much! I see what I was missing. Your help is ve... (by closed account 9G8M4G1T)
|
by Denvor
how do i get my program to run?
|
Sep 27, 2021 at 11:31am
[10 replies] Last: @Denvor Please do NOT delete your question after getting your answer. ... (by MikeyBoy)
|
by Qsh222
C++: Find the XOR of a closed interval of the array
|
I've worked out a solution, but it's not efficient. Could someone optimize my solution, using prefix sums. #include <iostream> using namespace std; int ma... |
Sep 26, 2021 at 8:22pm
[1 reply] : #include <iostream> using namespace std; int main() { int n, m; ... (by lastchance)
|
by zer0Cool
Every 11 years, add certain amount
|
I'm stuck on this part of my homework. Everything else works, except for one function. I need to add 1/7 of an inch for every 11 years over the age of 31. I hon... |
Sep 26, 2021 at 5:55pm
[4 replies] Last: fucking life saver. Thanks a lot. (by zer0Cool)
|
by Qsh222
How to calculate XOR on a given interval of numbers
|
For example, you're given the interval 5 15 17 90. How to calculate the XOR of it? |
Sep 26, 2021 at 4:56pm
[4 replies] Last: OP probably meant "sequence", not "interval". (by helios)
|