Beginners - January 2020 (Page 4)

by kmce
Hash tables
 
Hi i am having to create a hash table for a project, but i have never actually created one before, and to be honest my programming skills are not very good, so ...
[18 replies] Last: of course, i am forgetting they are not stored the same way as arrays.... (by jonnin)
Declaring in loops question
 
I am assuming that if I do this. I am not stacking memory on top of each other but it is going through the process of: 1. Create an object 2. After each iter...
[2 replies] Last: Thanks (by advancedip)
Struct initialization with parameters?
 
ld like to use a struct into a function fillRect, containing the memeber values in the call // this is from some library typedef struct tagRECT { LONG ...
[1 reply] : auto MyFillRect(ignore1, RECT const& r, ignore2) noexcept { return F... (by mbozzi)
is this possible with #define?
 
I've been playing around with this idea for a few hours and can't get the code to work as expected. I'm not even sure if this is even possible. I'm probably o...
[6 replies] Last: m really starting to see the conundrum that the whole thing creates. ... (by dutch)
by ema897
new class header
 
Unfortunately, I made a class that has over 1000 code lines. Is it possible to add another file to split class.cpp ?
[10 replies] Last: There seem to be two different errors: * The "undefined reference" is... (by keskiverto)
Vectors
 
I have a program that I am supposes to convert from using a dynamic array to a vector. I am currently stuck on a function readData() where I need to read names ...
[15 replies] Last: I got the program finished. Thanks to everyone for your help and poin... (by stoneJax)
by ema897
extract words from file with stringstream
 
I want to read a file: word_1 word_2 word_1 word_2 word_1 word_2 .. extracting word_1 and word_2 with stringstream. int main(){ stringstream b,x...
[3 replies] Last: thanks. (by ema897)
Calculator program, error received "no match for 'operator>>'
 
It has been years since I took C++ in college, so when my manager asked me to work on a project in C++ I decided I needed a refresher course. I found one online...
[4 replies] Last: #include <iostream> using namespace std; int main() { int choic... (by againtry)
What's the differences between ' ' and " "?
 
Hello, What's the difference between ' ' and " " in the below example? Thanks #include <iostream> using namespace std; int main() { cout...
[2 replies] Last: The double quotes are a shorthand for C-strings, which are null-termin... (by keskiverto)
by bsmith
Assigning array values
 
I have a question about assigning arrays values from other parts of the array. For the example below, line_number is a 2d array of integers (line_number[......
[2 replies] Last: When I assign a string array another string array, I don't need the s... (by dutch)
Computer Architecture
 
Hello everyone. I am once more stuck with a question in my assignment that I can't fully understand. Please if some one understands the question, let me know. T...
[5 replies] Last: My personal choice is "depends." How the digital circuitry is current... (by George P)
by hbcpp
Maximum number of elements an array can hold
 
I have a program where it asks the user to input the number of elements of an array(I use array instead of std::vector on purpose), when I input the number 9999...
[5 replies] Last: Thank you guys for your insights!! (by hbcpp)
by ema897
debug and segmentation fault
 
when I start my project in natural way, it gives me error: Process finished with exit code -1073741819 (0xC0000005) but if I start it in debug, it's all o...
[8 replies] Last: Yeah I wasn't being very serious; I was just suggesting it might be th... (by Ganado)
by Foxel
Reference error
 
I was working on a project using a static library created by me (I'm using Visual Studio 2019 version 16.4.3) It always worked on other projects, but since I...
[3 replies] Last: Hello Foxel, My bad, I apologize. When I said version I was being mor... (by Handy Andy)
C++ Implementing Lists Within Lists Using Structs/Classes
 
I am trying to conceptualize how to get started with a project to basically have two linear linked lists managed using a combination of structs and classes. The...
[1 reply] : a list of lists is fine. Ideally they would be the same thing, via a ... (by jonnin)
Runtime Visual Studio
 
Hey everyone, i just made a basic program to calculate a the product of a 500x500(don't ask me ask my professor) matrix with itself and everything is ok the on...
[8 replies] Last: I used 2 read-only(const) iterators to go through the vector simultan... (by dhayden)
object oriented programming
 
Write your question here. Hello every one, I have been given an assignment regarding object oriented programming. the only problem about it is that it is not a...
[2 replies] Last: Its an interesting question at least ... but why do they always break ... (by jonnin)
change fuction
 
Hello,my program sum min and max number in vector. How to change the function in this code to give the sum of even numbers #include<iostream> #includ...
[2 replies] Last: Why change? Add a separate function. (You can delete unused functions ... (by keskiverto)
Passing a Static Array in a Function which accepts Double Pointer
 
Here is the code, #include<iostream> using namespace std; void fun(int **ptr) { for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { cout <<...
[6 replies] Last: Ganado (3943) I'm sure GCC "correctly" supports it as an extension, bu... (by jonnin)
How to instantiate an iterator template
 
I am in the process of learning C++ and have been given a skeleton class to complete. It is a template to create a RingBuffer Container. There is also a templat...
[4 replies] Last: Yes, inside RingBuffer I had using iterator = _RBIterator<T, T*, T&>;... (by goozeberry)
January 2020 Pages: 123456... 12
  Archived months: [dec2019] [feb2020]

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