Beginners - March 2019 (Page 7)

Is this the correct approach for making a deep copy?
 
Hi I have an object of type C whose only member variable is a vector of objects of type E. Every E has a member variable which is a pointer back to C. If ...
[3 replies] Last: Oh, okay, so you want C to call E's accessor method, but you want the ... (by Duthomhas)
by remyk
Trying to use the SFML library
 
Hello. I am a student beggining a project using object oriented cpp. I never used any graphical library before therefore my knowledge in the subject is pretty...
[no replies]
by rdp
please help with mey arduino code
 
hello, I am pretty new in programming with c. i got a arduino and i have to make a tutorial for my study. I already made a code but it does not seems to wor...
[1 reply] : if (buttonState == HIGH && statusled6 == HIGH); Firstly, notice tha... (by Grime)
Mistake
 
Hello, it must be a nonsense but i can not see it I hace two files Proincipal.cpp with the main and other Individuo which code is: #include <iostream> #in...
[4 replies] Last: the methos set works properly (by psosmol)
by sturk
C++ question on multiple class inheritance
 
Could someone explain to me why is there a compilation error in the code 'Endangered* pEndangered = new Panda();' while the rest is correct. I am revising for a...
[1 reply] : Because Endangered is not inherited publicly. This should fix it: ... (by Peter87)
Further iomanip confusion
 
Hi, I'm not sure the proper terminology for this alignment in c++, but in MS Word, it's called right alignment. I want to get able to have text end at a certa...
[1 reply] : #include <iostream> #include <iomanip> int main() { const char* ... (by JLBorges)
segmentation fault
 
Hello I wrote a code in c++ with a vector and I have an error message segmentaion fault should I resize the vector with the vector resize(int, val) every tim...
[7 replies] Last: The vector is not the problem. (Hint: never blame standard library rou... (by Duthomhas)
Help
 
I am trying to build a program to calculate the total volume of a tin can given the input variables, and then using the total volume, calculate the price of how...
[1 reply] : The first mistake I see is that you're trying to use endl with an inpu... (by jlb)
Need Help Separating Outputs
 
So I’ve just started programming for college and we’re now halfway through the semester. I am still VERY new at this so forgive me. We were tasked with sep...
[7 replies] Last: Hey Andy! You are the absolute best and you have made my first experie... (by SkytheWitcher)
setw trouble
 
Hi, I'm trying to cout two arrays with right setw, but I can't get it to work correctly. I've tried this.... int i = 0; while (i < howMany){ cout << f...
[3 replies] Last: Good job! Sometimes you will want to compose a string and justify all... (by Duthomhas)
Rankings list
 
N students participated in the programming competition (N> 4). After completing tasks, students rank according to the number of points scored. The first 5% of...
[1 reply] : Hey buddy,Put your code,then only we can help you. (by SparkXV)
If Statements and strings
 
I'm new to learning C++ and am currently working through Stroustrup's Principles and Practice book. For one of the exercises, I created the following functi...
[2 replies] Last: I really should check over my code better...the = was of course a typo... (by Vitesze)
by cutwo
please help
 
could use a second pair of eyes. please and thank you i wanted to use "expression" as an operator and run loops #include <iostream> #include <cmath> ...
[2 replies] Last: string expression (int) ; this is a function declaration. I would p... (by closed account z05DSL3A)
by vysero
Help printing the contents of this map
 
I am trying to figure out what this map contains but I can't seem to print its contents. Here is the initialization: std::map<uint64_t, uint8_t> devices_s...
[1 reply] : Hello vysero, You define the map as having a "key" of "unit64_t", (a ... (by Handy Andy)
no match for ‘operator=
 
Hello, I have 2 files: Principal.cpp with the main() and Individuo.h The individuo code is: #include <iostream> #include <vector> #include <string> ...
[1 reply] : factor = ftr; The quantity on the left-hand side, factor is a v... (by lastchance)
Snake Game
 
i'm trying to create a snake game and i have just created the frame and i wanna see if this will work or not some one guid me please #include <iostream> in...
[5 replies] Last: Your next step should be to get some input from the user. Focus on g... (by AbstractionAnon)
allocator whitout define
 
Hello, I have 2 files: Individuo.h and Principal.cpp Principal.cpp code: #include <iostream> #include "Individuo.h" using namespace std; int main(){ ...
[10 replies] Last: thanks for all (by psosmol)
by wuwy
How can I compare data from char array from structure
 
Hello, I got this exercise where I have to compare gene fragments of two (or more ) sheep and print out the matching coefficient. But I get random data when I t...
[8 replies] Last: Okay, sorry. Should ask stuff more clearly. This is the full program i... (by wuwy)
assignment!!!
 
so im still figuring it out what the hell am i doing with my life haha. i found the same homework posted here before. but anyone here who's willing to answer my...
[9 replies] Last: i'm done with cpp Nice. Is it possible to publish your solution of t... (by MikeStgt)
atof() precision (1,2)
 
Greetings! A question to input arguments of main(). My program receives a string representing a number upon call, e.g. "1.6". At the start of the code, it is t...
[28 replies] Last: Thank you, it helped a lot. Meanwhile, I have figured out that my sys... (by PhysicsIsFun)
March 2019 Pages: 1... 56789... 25
  Archived months: [feb2019] [apr2019]

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