General C++ Programming - June 2017 (Page 6)

by Bank
Why is this program working?
 
for this question: someone had a plan to access another person's computer and the plan was to send...
[4 replies] Last: @Bank: the code is equivalent. you had return result(m+1, /**/); tha... (by ne555)
by varmy
The Initialization Problems in Program
 
Good morning~all I am measuring QEA and QEB of DSPIC30F2010 with the frequency 100KHz. The wave is ...
[no replies]
by Kalcor
BST Implementation.. correct?
 
I couldn't understand something in this BST implementation, first here is the insert function: Bst...
[2 replies] Last: Yea you right when I traced the recursion later on I got why both meth... (by Kalcor)
Adding border
 
So I'm trying to add a border around my menu. Someone told me to try using screenloc() and box(). Ho...
[6 replies] Last: For simple jobs it's often easier to hardcode the menu as follows; #... (by closed account 48T7M4Gy)
by Kalcor
A way to make infix > postfix with more than 1 char/digit
 
So I implemented a stack, that should turn an infix to postfix but sadly, I can't get it to work for...
[2 replies] Last: @kbw Ah I'll try that, thanks! (by Kalcor)
by Kalcor
Parentheses checker logical error
 
This below, is an implementation of stack method for parentheses checker, this code works extremely ...
[2 replies] Last: if(s == ')'){ if(checker.top_element(top) == '('... (by ne555)
Searching 2D array
 
I am attempting to search for a string value in a 2D array based upon an inputted username. This cod...
[6 replies] Last: #include <iostream> #include <fstream> #include <iomanip> #include <s... (by doublemirchi16)
An imaginary lock mechanism.
 
Here comes our scenario. Simply, Bob and Alice are a write and a reader. Bob writes things and Alice...
[4 replies] Last: Thank you Cubbi, Seqlock is the answer. (by nemonemo)
by Kalcor
Is this a correct use of delete?
 
Did I use delete correctly in this code snippet? void pop(Stack *&top){ if(top == nullptr...
[5 replies] Last: Your delete is fine (with the above assumptions from @Peter87), but yo... (by doug4)
Functions not working
 
So I got the first function, is digit to work, but not the others. I'm confused because I used them ...
[1 reply] : Return Value A value different from zero (i.e., true) if indeed c ... (by integralfx)
Need some help with arrays and functions
 
Hi(sorry for bad english), I have some trouble with this i'm supposed to create 4 functions 1st pri...
[1 reply] : Please, always use codetags (the <> formatting button) when posting co... (by chicofeo)
by Kalcor
Linked list question
 
So I was implementing a function that adds data to the tail of the linked list so I tried 2 things o...
[3 replies] Last: `head' is a pointer, so you must be assigning a memory address. `temp'... (by ne555)
by Kalcor
XOR Swap algorithm weird error?
 
I was implementing a quick sort on some array but I encountered this weird error: int part(int a...
[3 replies] Last: xor swap is also slower usually. The cpu has to do the xor AND the sa... (by jonnin)
by Disch
(Templates) Variable args
 
Hey all. Long time no see. Sadly I don't have the time to keep up with these forums like I used to...
[2 replies] Last: Perfect. Thanks JLBorges. Yes I know to use make_unique. I was just... (by Disch)
Strings in C++
 
I use Dev-C++ which has GCC 4.9.2 C++ compiler. I am confused on where and where not to use the fol...
[3 replies] Last: [quote=abhinav mathur]1. include <string> only 2. include <string.h> o... (by Enoizat)
by Kalcor
Is it possible to return an array?
 
Is it possible to create an array within a function and return it at the end of the function ? Also...
[4 replies] Last: > Is it possible to create an array within a function and return it at... (by JLBorges)
by Kalcor
What does this expression mean
 
Sorry for posting for such a short question but what does this int *&s1 mean?
[3 replies] Last: Do you have Google? Perhaps wiki ? (by TheIdeasMan)
Runtime error: Process terminated with status 255
 
I am trying to find the 10001st prime number. It shows runtime error. #include<iostream> using na...
[6 replies] Last: @ne555 yeah! it was because of array size being too small. (by carleye)
Difficulty with Abstract class
 
In my program given below: #include <iostream> #include <ostream> using namespace std; enum ...
[2 replies] Last: [quote=napada99]I'm getting a garbage value for Month m What do you p... (by Enoizat)
Help solving Rate and Hours Problem
 
Create a C++ program to calculate and display an employee’s weekly gross pay. The program should a...
[5 replies] Last: Read the Arguments passed by value and by reference section http://w... (by integralfx)
June 2017 Pages: 1... 45678... 11
  Archived months: [may2017] [jul2017]

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