General C++ Programming (Page 2)

Need help with Class code.
 
I am writing a code that converts a non-negative number into a vector of binary numbers. Example: 19...
[2 replies] Last: or use bitset operators (by shadder)
Identifying mathematical sets from input.
 
A set is a sequence of comma separated elements enclosed in square brackets. An element for a set ca...
[3 replies] Last: OP: you could also have a struct Element for each element of the set w... (by gunnerfunner)
by nbro
When should value semantics be preferred over using smart pointers?
 
Hi! I've seen people saying to prefer values (value semantics) over X, where X once happened to be ...
[2 replies] Last: Even with smart pointers, it's a mistake to just assume smart-pointers... (by mbozzi)
Separate a string in two parts
 
Enter Your Name along with Roll No Roll No NAME For example Mc1504029 Kuhshdil Kamal fal...
[6 replies] Last: OK thanks for help (by kamal3310)
Palindrome Problem
 
So basically this is a palindrome checker for strings. The problem is that I have to make it run 3 t...
[4 replies] Last: You got it Thanks (by wawaluigi1234)
Undirected weighted graph matrix
 
I do not really need help with programming, i more like need some test data which i can't seem to fi...
[no replies]
Operator Overloading !!
 
I need to know can i change cout operator ""<<"" with "<"(single one) with operator overloading or ...
[1 reply] : Yes you can. #include <iostream> // Use templates to redirect ... (by Peter87)
by kais2
to find a word in a string
 
#include<iostream> #include <stdio.h> #include <iomanip> #include<string> using namespace std; ...
[2 replies] Last: thanks :) now it's giving me the third word (by kais2)
Exponents and Square Roots
 
This is my question. I'm writing a program for an assignment that asks me "Determine the position of...
[1 reply] : Firstly, you may need to clarify things a bit. The distance of M from... (by lastchance)
by Cnoob8
undefined reference to
 
Hi guys! i wrote one c++ program to recreat and play one game but i have this 'undefined reference...
[1 reply] : Could you provide the code snippet? You can't exactly pinpoint what's ... (by Golden Lizard)
Finding a specific weekday
 
I was given the assignment of finding the specific weekday of a date while using January 1st as a re...
[5 replies] Last: edge6768 has the right idea. Need to accumulate leaps years but the ... (by kemort)
Is this correct / Suggestions?
 
Hello, I have tried to make my start of a Component Manager for all bunch of Components I want in my...
[5 replies] Last: virtual ~Component() = 0 {}; //ยง10.4/2 a function declaration cann... (by gunnerfunner)
Pulling pieces from a string
 
So I take a biology class, and in my class we are working on sequencing DNA and mRNA. I was wonderin...
[1 reply] : If the sequences are in a file read that file character by character. ... (by edge6768)
Passing Structures to Arrays
 
So I know that there are topics about this already, but I have seen none that help with my specific ...
[8 replies] Last: With your while do while switch, it's easier to put the switch in a lo... (by TheIdeasMan)
C++ File handling help needed
 
The following program is actually written to count the number of alphabet in a .txt file. But the pr...
[7 replies] Last: You might also try Coliru (This is @gunnerfunner's solution) :) http:/... (by mbozzi)
How to use namespace in different files
 
// 1.cpp //------------------- #include<iostream> namespace np { int i = 0; } //-------------...
[8 replies] Last: @doug4 The ability to inline variables was (will be) added in C++17: h... (by mbozzi)
Infinite loops issue
 
when i compile and run this, It continually loops and never ends, can someone explain why? string...
[2 replies] Last: I changed the variable answer to "no" and used && instead of or st... (by Zachphilipp)
Interview Question Trap!
 
There's a trap in interviews today, and I'm wrestling with how to address it. Let's take for exampl...
[3 replies] Last: as an interviewer, I would love it very much to see you throw a well-d... (by Cubbi)
How to share info between two functions without using global
 
#include <iostream> using namespace std; void first(), second(), third(); int main() { first(int a...
[3 replies] Last: @OP - There are a number of problems with your code: Line 4: Your fu... (by AbstractionAnon)
Convert console app to Win32 app??
 
I have this console application, that converts simple words into complex passwords and would like to...
[3 replies] Last: This is probably overkill for what you're doing, but might give you so... (by AbstractionAnon)
Pages: 1234... 25
  Archived months: [nov2016]

Cannot post in this page. To post a new message, go to the first page.