General C++ Programming - April 2018 (Page 7)

load data from txt files c++
 
i got multiple txt files and i am trying to load data from the filed and want to store it in the vector. I am totally confused in it hoe to start it. Any kind o...
[1 reply] : Your question is too vague. (by tpb)
I need help for my test
 
Hello programmers. I'm honestly here for help with these programs. What will their answer be? Thank you for your help. Here are the links: https://pastebi...
[4 replies] Last: I understand. Thank you. It was very simple. (by Andrew012p)
by JN1982
Arrays
 
Need to answer the ffg questions but battling to find the answers: 1. Given the following array declaration, what is the value stored in the scores element...
[2 replies] Last: thanks for being so frank and helpful at the same time (by JN1982)
Best way to use 'using'
 
Hello, I would like to know the best way to use the 'using' keyword. I am aware that there are topics (especially on stackoverflow), but unfortunately I stil...
[8 replies] Last: Thank you for your answer and help :) (by BigfootCpp)
Feeling like I'm missing something here....
 
So I have an assignment, I want to believe that the pieces are there, but I'm failing to connect some dots. What exactly am I doing wrong here? I'm newish to C+...
[1 reply] : Look at this snippet: case 1: int setWeight(); void initiailize(); v... (by jlb)
Defining Functions, Passing Values In/Out
 
All - First, I used to do some very simple C++ coding a few years ago - just picking it back up. Passing values, pointers, etc into and out of functions has ...
[8 replies] Last: So what is the name of the input file supposed to be? Your line 14 see... (by CharlesPhillips)
Networking protocols
 
Hey guys I was having a discussion with my lecturer earlier about how networking protocols are implemented and he says that they are a set of rules written in a...
[3 replies] Last: thanks guys Hayden I found a copy of his book online http://www.r-5.... (by adam2016)
by aidam
Invert an integer
 
hi guys i was doing a exercise about invert an integer,but i have to do this using vectors . example 321 will be 123 I did the program, it worked, but when I p...
[2 replies] Last: ok I assume this is meant to remain in C and that you don't want a C++... (by jonnin)
by user42
number exersizes
 
I am a beginner in c++ and wanted to learn some tips and tricks with working on digits and numbers. for example to get the last digit of a number we do number%1...
[2 replies] Last: there are literally millions of these things. eg x >> 1 is the same ... (by jonnin)
Read access error thrown when calling destructor
 
I'm currently writing a linked list project for school and I'm coming across an error when calling the destructor. My destructor looks like this: EmployeeLis...
[3 replies] Last: The destructor is called whenever the object is destroyed . That's t... (by MikeyBoy)
Can someone help me break down my assignment
 
I am having a trouble just breaking down this big assignment. I have code done, want someone to tell me if I am on the right track Here is my assignment: 1. Cre...
[6 replies] Last: thank you @Thomas1965 (by anon001)
how to solve linker error while using FFTW library?
 
I want to make use of FFTW library for calculating FFT of a sequence. But when I try to compile it, I get 'undefined reference to' error. My project is located ...
[1 reply] : You need to make sure your linker knows where to find the library. (by MikeyBoy)
I need help with my autoclicker.
 
Alright, before you say just use mouse_event, just hear me out, please. I am making an autoclicker that only clicks when you hold left click down. I tried this ...
[1 reply] : Wow I just looked up the code for a tool called FastClicker, and it ma... (by poteto)
What's the rule on static template member initialization?
 
Are compilers allowed to optimize these out if they are not referenced? Seems different to normal static members, which alsays initialize. https://wandbox.o...
[1 reply] : > Are compilers allowed to optimize these out if they are not referenc... (by JLBorges)
LNK 2019 && Lnk1120
 
I have been looking around on the forums, and most people say this is called when a function does not have a body but I have checked and all have a body. I am n...
[11 replies] Last: In case anyone ever stumbles upon this. I had it for a win32 project a... (by Helquin)
Reverse engineering code
 
Hi there, I am currently doing an assignment where I have to write a code to decrypt a text file that is given to me. I am just stuck on how to reverse engineer...
[8 replies] Last: I had the srand() inside a while loop therefore it was giving me rando... (by AdamWazer1998)
hash table collision/insertion
 
I think i have the openAddress method working, but i am unsure of how to continue with the chaining one. I can't figure out how to access the members of the poi...
[no replies]
by helios
How to RAIIfy this common pattern? (1,2)
 
//Foo foo; //Bar bar; //Baz baz; { auto old = foo.get_snafu(); foo.set_snafu(x); //... foo.set_snafu(old); } { auto old = bar.g...
[23 replies] Last: @helios, you're not wrong, but the way you replied on page 1 could be ... (by Ganado)
What is a collision in a hashmap?
 
There are two inputs an inputHash and text which would indicate a collision?
[1 reply] : A collision in a hashmap is when two objects hash to the same value. ... (by Ganado)
How to serialize a time_point?
 
Having this code: namespace date { using days = std::chrono::duration<int, std::ratio_multiply<std::ratio<24>, std::chrono::hours::period>>; ...
[5 replies] Last: I think I got it: date::sys_days int_to_sysdays(int val) { std::ch... (by JUAN DENT)
April 2018 Pages: 1... 56789... 17
  Archived months: [mar2018] [may2018]

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