Beginners - July 2017 (Page 10)

why this compile ?
 
why does this code compile ? I thought you need to initialize reference #include <iostream> class lol { private : int& wat; public : lol(int& haha) ...
[9 replies] Last: after more than a week and 2 days of cplusplus broken I will proudly a... (by Flaze07)
Time library to store millisecond data
 
Hello, I am reading a csv file which has a lot of time series data in it. I am wondering what is the best way to store this - the data is millisecond-leve...
[5 replies] Last: thank you!! - worked perfectly. Ended up adapting it to read via csv.h... (by erixliechtenstein)
Column
 
Write your question here. So im trying here to solve an exercise by using files but i don't get why the site of our university does not approve of it. So i have...
[3 replies] Last: > i don't get why the site of our university does not approve of it >>... (by ne555)
CURL Read access violation
 
I made a CURL Test project to begin testing things out and all went well, but when I tried to move it into my main project I ran into plenty of errors. Now, a f...
[3 replies] Last: Something like this would be more in keeping with the spirit of C++. C... (by JLBorges)
lazy initialisation with shared pointer
 
Hi I am trying to introduce a lazy initialisation using a shared pointer. The function that performs the initialisation is a public member function and uses a ...
[7 replies] Last: so no lazy initialization then. (by ne555)
Way to better what I have done
 
Hi all Quick run down, I am self taught at C++, I have been doing it for about 2-3months. I have done the SoloLearn tutorial and I am very keen to get better a...
[6 replies] Last: defaultClass is not a good name. It doesn't say anything for what an... (by coder777)
edit Board
 
So I am in the middle of a sudoku project, but I am having no success trying to see if the space in the array is filled or not, if it is empty I want to add a n...
[6 replies] Last: I fixed it I just changed my if statement to have != '0', and it seeme... (by alextexasfan12)
by stav
problems reading binary file
 
hello I'm trying to read the first 6 bytes of a file, but its giving me wired results and i cant seem to figure out what im doing wrong. this is my code, th...
[4 replies] Last: See post in General http://www.cplusplus.com/forum/general/218903/#msg... (by Handy Andy)
by Meden
redundant initialization vs readability
 
If I have a function that I am to call 100 times in the life of a program, when should the variables be initialized? Is it better to do something like this: ...
[1 reply] : I'd be more worried about continually copying that vector than merely ... (by jlb)
by Meden
Learning Windows Date Functions
 
I wanted to begin to learn how to use some basic Windows functions while doing Project Euler Problem 19. https://projecteuler.net/problem=19 Basically, I wo...
[4 replies] Last: how this can be done very easily without a computer. "Since there are... (by lastchance)
by ebii
compiler doing problms
 
why my compiler dont know the strcpy. always makes me trouble when iam using this method of strcpy how to avoid it? #include<iostream> #include<cstring...
[7 replies] Last: > why my compiler dont know the strcpy. > always makes me trouble when... (by JLBorges)
cUrl/libcurl not working. Multiple unresolved externals
 
Hello, I am attempting to use cURL to send a POST request to my web server, yet I am running into many many many issues. First, it took me a minute to figure ou...
[6 replies] Last: Thank you :) (by ExSanity)
while loop sentinel
 
I am almost done solving this problem but i need some help. Currently the input for numBoxes accepts negative numbers ie. -10 boxes of cookies. How do I add a w...
[3 replies] Last: i made a typo. should be ie. 10, -10, 24, -1 (to quit) returns: The ... (by ahswong)
Node Handle
 
During a random documentation check on google noticed new member function overloads for some containers taking what happens to be a new standard type from C++17...
[3 replies] Last: Thanks mbozzi for your helpful reply. Thank you very much JLBorges, Th... (by akash16)
by Rodev
Including a GUI using QT - Best Practice
 
I have a small program that was coded in Xcode. Now, I would like to include a GUI and I decided to try QT. My question is: - is it a good practice to use an...
[1 reply] : What is the "best practice" in the industry? I don't know what's the... (by Enoizat)
by xxvms
Vector
 
Hi there I am doing exercise where I have class Car and class Garage. I want to create vector of cars, that will be stored in Garage class. In order to "move c...
[5 replies] Last: jlb has great advice. What is the purpose of Car::add()? It basica... (by dhayden)
decrementing value question
 
I ran the code below and x returns 6. I had my answer as 5 but I cant wrap my head around as to why the answer is 6. Can someone please explain to me what I am ...
[1 reply] : http://www.cplusplus.com/forum/beginner/189811/ (by Enoizat)
Boolean Question
 
Would someone please clarify why entering 1 would return true and 0 would return false? #include<iostream> using namespace std; int main() { int x = ...
[2 replies] Last: got it thanks! (by ahswong)
Need help with my mock exam yet again
 
I am sry to trouble u guy, but i am stuck again. Same rule I get a main.cpp and muss write classes to make it output the supposed output. I am not allowed to mo...
[8 replies] Last: ... (by sapi3ntia)
seekg
 
i have a question about seekg. from my understanding myfile.seekg(2, ios::end); will position the pointer to the second last element and start reading f...
[4 replies] Last: #include <iostream> #include <fstream> # include <sstream> using nam... (by masterinex)
July 2017 Pages: 1... 89101112
  Archived months: [jun2017] [aug2017]

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