• Forum
  • General C++ Programming

General C++ Programming

by admin
Welcome to this board!
 
Welcome to the general programming forum in C++.com! In this forum, users can to talk about any top...
[no replies]
Evaluate Fixpost Expressions with Linked Stack
 
I have the linked stack files (header and implementation). But I don't know how to write a program w...
[no replies]
In C++ 11, how can we initialize a char* with an empty string?
 
I tried this: char* buffer = static_cast<char*>( ""); Gives error: error C2440: 'static_cas...
[15 replies] Last: @Cubbi, thank you for your answer. (by Enoizat)
Converting InFix to PostFix with Linked Stacks
 
#include <iostream> // <<, >>, cout, cin #include <string> // string, ==, find, n...
[1 reply] : 1. Please use the code formatting tags to format your code. It's not ... (by kbw)
If you assign one Node to a second Node, does that second Node have the same data address as what was assigned to it?
 
Say I have this Node struct: struct Node { int data; Node *prev; Node *next; ...
[4 replies] Last: Ah. Okay. I get it. How can I avoid a memory leak if I have to have a ... (by vaderboi)
cannot get program to end if user enters quit
 
I cant get the program to terminate if the the user enters exit. Not sure what I did wrong. Thanks ...
[4 replies] Last: A couple of things: 1. PLEASE learn to use code tags, it makes readin... (by Furry Guy)
basic_string::_S_create
 
am trying to run mu program but i got the following error message "terminate called after throwing...
[4 replies] Last: am trying to run mu program but i got the following error message "te... (by jlb)
Cast (or copy) Base class into sub class
 
Dear experts I understand the mechanism of downcast, that is, base class can be cast into the sub c...
[12 replies] Last: Is it anti-pattern to have the same state in all inheritance family? ... (by dhayden)
Is there better way to increment the count every 10, 100, 1000, ...?
 
The problem I faced with this idea was when I was supposed to count the length of some string. If I...
[7 replies] Last: Use the standard solution: escape sequences. For instance, with the c... (by JLBorges)
Can binary search fail if low = mid instead of mid + 1?
 
I am trying to understand how binary search works. The basic code, for anyone who doesn't know, is a...
[2 replies] Last: has nothing with either one instead it depends on what are contents of... (by abdulbadii)
Want to create padded 2 dimensional vector in c++ style
 
I was trying to create padded 2 dimensional vector in c++ style, like using copy or copy_n function ...
[2 replies] Last: #include <iostream> #include <string> #include <vector> using namespa... (by lastchance)
if statement with multiple conditions
 
I'm trying to create a program that outputs your zodiac animal based on the year you're born in. I'v...
[2 replies] Last: // if (bornYear==1924||1936||1948||1960||1972||1984||1996||2008) sho... (by JLBorges)
by dmo
how to implement the playGame() function so it doesnt break the working code
 
#include <iostream> #include <string> #include <fstream> #include <stdlib.h> #include <time.h> ...
[11 replies] Last: thanks homie but i figured it out. In the future, I'll be more specifi... (by dmo)
Understanding this code of Binary Search Tree Implementation through Array
 
Oh My, sorry... Got it wrong totally.. Please delete this
[3 replies] Last: Please don't go deleting your question after you've received an answer... (by MikeyBoy)
Election Security
 
Rob and Jason are joined by Patricia Aas from TurtleSec. They first discuss blog posts on module lin...
[no replies]
Use arrray and for/while loop to create a quiz game
 
Thank you joinnin and Thomas for your reply! I almost had a panic attack this morning as this homewo...
[5 replies] Last: Fix 3 things first and then re-post in code tags. (1) Initialisation ... (by lastchance)
string parsing
 
i was learning string parsing using c++. i came across a problem where there are many delimiters an...
[4 replies] Last: @Duthomas thank you for your help , those stl functions were very he... (by cplusplus121)
HELP {PROGRAM}
 
Hello everyone . So i tried to make a program that allow the user to select if he wants to add subtr...
[2 replies] Last: ok thanks (by JOHN2172000)
How to correctly initialize instance of a class that has a template?
 
I am creating my own implementation of a List ADT and I am really confused as to a linker error that...
[14 replies] Last: You are welcome. Template techniques are sometimes confusing, please b... (by Mitsuru)
Why getting a value from a function using auto&& seems to produce a temporary value
 
I have the following code: int&& getInt() { return 4; } int& getLvalueInt() { int r ...
[5 replies] Last: An lvalue reference won't bind to an rvalue, which is a problem in thi... (by mbozzi)
Pages: 123... 14
  Archived months: [aug2019]