Beginners - July 2018 (Page 5)

Inserting element at the end of a linked list.
 
Well,The function InsertAtTheEnd(); is not working as expected. My logic is sound and implementati...
[3 replies] Last: Remember to check that temp5 is not null before entering the loop! (by helios)
How to code grid perimeters
 
Hi, I'm new to c++. How can I create a simple grid map using a 2D array, in C++? Like below illus...
[2 replies] Last: #include <iostream> #include <string> #include <vector> #include <ran... (by icy1)
Inserting element at nth position in Linked List
 
The function InsertAtnthPosition() is not executing properly at the program crashes. I have yet to a...
[7 replies] Last: Actually I've been always indexing linked lists from 1 since i started... (by akshatmahajan3112)
follow up: console closing down, code example (1,2)
 
I wanted to follow up about the console closing, and one of the solutions. Is there ...
[28 replies] Last: This looks like crap because it is looping through so fast. But press ... (by Manga)
bit operations
 
Hi - can anyone explain to me why these are not equivical? Or at least they are not on my iMac... T...
[3 replies] Last: Strange example, since 16387 << 2 comes out to 65548, and typical rang... (by icy1)
Checking if a key exists in an unordered_map and incrementing its value
 
I'm trying to check if an unordered_map contains a particular key, and if this is true, then increme...
[6 replies] Last: too few mentions of '43' in the output from other answers, or actually... (by icy1)
Arrays with incrementing values...yay! :(
 
So the code is supposed to be basically like a survey. And it would be soooo easy if we could write ...
[5 replies] Last: @BGA6444 -- when did the teacher code stop and yours begin? It's not ... (by icy1)
by t009
Ctrl+Z causing double entry in while(cin)
 
Using ctrl+z to exit a while loop causes the loop to record the last value twice into my vector. Any...
[2 replies] Last: One quirk of C++ is that a stream doesn't register end-of-file until a... (by dhayden)
int / float
 
Greetings, short question: a = static_cast<float>(150-i*i)/10.0f a is a float, i is ...
[2 replies] Last: Thank you jlb, I am not using anything, it's from a book :) (by PhysicsIsFun)
Trying to understand how to access objects members from functions
 
Hi all, my first post here! So, I'm pretty new to c++ and still getting to grips with some of the...
[2 replies] Last: Ah ha! I can't believe it was that simple! Thanks very much :) (by Hollowman)
Destructors
 
I'm having a hard time understanding the application of destructors to a class. My book only gives ...
[3 replies] Last: Ahhhh ok thank you both for the responses that definitely clears it up... (by passiontrip)
Unable to access options
 
Hi, I'm new to c++ and really need your help to program as stated by topic. I can't seem to get m...
[2 replies] Last: You had the correct idea for a menu, you were simply missing a few ite... (by closed account E0p9LyTq)
Segment Fault.
 
So i`m trying to finish up a program i`ve been working on but I have hit a wall with a segment fault...
[4 replies] Last: I have hit a wall with a segment fault Lucky you! I can’t even com... (by Enoizat)
looking to learn from breaking the rules
 
"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your w...
[2 replies] Last: > I want to know besides things like infinite loops, any "ill advised"... (by JLBorges)
Changing to arrays
 
// I need to change this to arrays but can not figure it out #include <iostream> using names...
[6 replies] Last: #include <iostream> #include <algorithm> #include <iterator> constex... (by JLBorges)
while(1) & Interrupts
 
Hello everyone, I am using PIC micro controller to program a series of leds. My question: is it pos...
[4 replies] Last: I need to clear g_status bit, but not sure how to do it. g_status... (by Repeater)
by b3y0nd
2D - Array - User input - Nested For Loops
 
I am calling a function getsales - asking for the elements to fulfill a 2D array using FOR loops. ...
[9 replies] Last: Hello b3y0nd, For this subject you are welcome. I am glad it worked o... (by Handy Andy)
problem passing 2-D vector to a function (1,2)
 
why am i getting runtime error ,i spent a lot of time learning taking user input in 2-d vector ,stil...
[24 replies] Last: thanks a lot ...can you help me with debugging on code blocks...i ca... (by MikeyBoy)
by b3y0nd
Saving / opening / saving arrays
 
Is this the best way to go about saving / opening / saving an array. had the first program becaus...
[2 replies] Last: You could also write on a binary file. I think it would be less tediou... (by H00G0)
by Donut
Bubble Sort
 
I am attempting to sort some salary data that I import using bubble sort. However, I am not getting ...
[9 replies] Last: Thanks again for your help and guidance. As I stated previously I am m... (by Donut)
July 2018 Pages: 1... 34567... 17
  Archived months: [jun2018] [aug2018]

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