General C++ Programming - March 2019 (Page 4)

hay points
 
#include <iostream> #include <string> #include <cstdio> #include <vector> using namespace std; int main(){ int m; int n; int a = 0; cin>>m; cin>>n; stri...
[4 replies] Last: while its unclear what he is trying to do, this can't be right. while... (by jonnin)
Using while loop
 
Can someone help me to make a program that will output all the common factors of two numbers that the user will input using while loop? Another program that wi...
[2 replies] Last: https://en.cppreference.com/w/cpp/numeric/gcd use the while loop to dr... (by jonnin)
C++ library with a lot of data structures
 
Looking for performance efficient library(/ies) specifically right now i am looking for a library that supports array queues
[8 replies] Last: > I also found this "fixed capacity queue" Fixed capacity queue a la... (by JLBorges)
by gamma
How to use getline() correct
 
Following code causes me some problems and I really don't know why: #include<iostream> #include<string> #include <cstring> #include<cmath> #include<vecto...
[4 replies] Last: Sorry. I thought you meant that a semicolon is not interpreted by the ... (by gamma)
Filling an 8x8 class template array with UNIQUE random numbers from -50 to 50 .
 
I'm on a mini game project for my first c++ class and there's this thing i've been stuck on for like 2 weeks now , i hope i can find my savior ! what i'm lookin...
[13 replies] Last: [quote=FurryGuy]I've mentioned the shortcomings of the C library PRNG ... (by Duthomhas)
Stuck on this for a while now (code comes to a point where not showing output)
 
Hello, I've been working on this mini game project , and there's this thing I've been stuck on for a while now , if someone can tell me what's wrong with my cod...
[4 replies] Last: visual has a debugger built in, but it may be a sledgehammer for a fly... (by jonnin)
Need help
 
i need to make this program be able to accept input on whether you wanna enter Fahrenheit, kelvin, or Celsius and then it will display the other options dependi...
[1 reply] : [quote=rickbagent]Link to pastebin: https://pastebin.com/39pCrdi9 Th... (by chicofeo)
Help with Functions
 
It keeps telling me im using local unintialized variables in main. When I thought I assigned them a value #include<iostream> #include<fstream> using nam...
[3 replies] Last: Samhm313, Please, create a new thread with your issue. Thanks ... (by chicofeo)
change list while iterating trough it
 
hello everybody i'm trying to make changes to a std::list of ints while iterating trough it.i simply check each element, and if it is equal to 10, i delete it ...
[2 replies] Last: geez, i can't believe it. just added else i++ after line 15. thank... (by Stauricus)
Accessing multidimensional array elements
 
Hi, I have a simple question (might need some math for it, but whatever) about accessing elements of an array as if it was a 2 dimensional array. Let's say I h...
[3 replies] Last: thank you so much for the quick reply :) That solved it :) (by hassanAman)
How to print the variables that satisfy the given condition
 
I am writing a simple program that prints the variables that satisfy the following equation 2^4 + 2^4 + 3^4 + 4^4 + 4^4 = 5^4. But I am just getting the empty s...
[1 reply] : It really helps to be exact. Look at your equation. Then look at li... (by Duthomhas)
Cpp Display playing card suits
 
Some users were having problems previously with displaying playing card suits with cout. As of yet, I haven't been able to figure out how to do this with cout, ...
[2 replies] Last: They are mapped to control characters. 3 → ♥ 4 → ♦ 5 → ♣ 6... (by Duthomhas)
Roman numerals to integer using string (menuoptions)
 
Hello, im trying to create a menu where there should be different options, for example converting roman to normal numbers. Im not very good at programming so I ...
[4 replies] Last: I thought i did, new here so I thought the "remove" button were suppos... (by grazoth)
Need some help with my program
 
Hello, I am attempting to create a program that uses 5 different functions to open, read, and close a file, as well as determine the # of odd/even #s, in ...
[5 replies] Last: Lines 23-25: Your counters are uninitialized (garbage). Line 70-72: ... (by AbstractionAnon)
Finding maximum elemet of Stack and deleting it.
 
Hello. I am new in working with c++ stacks. I have a question. How to find the maximum element of stack, then delete it. Thanks in advance.
[6 replies] Last: [quote=jonnin]in practice, you would not use a <stack> c++ container h... (by lastchance)
Looking for a little help finishing a school project.
 
Hello, I am creating a c++ game for school. And need a little help finishing. It is a battle ship game, just single player and nothing fancy. What I have so far...
[2 replies] Last: I think you will find it mush easier to use a two dimensional array fo... (by AbstractionAnon)
How to link Assimp statically
 
Hi I am working on a game engine and using Visual Studio as my IDE. I want to build Assimp statically (so I would not have to use that the my .exe file will be ...
[2 replies] Last: Thank you so much for your reply, actually I figured it out through CM... (by hassanAman)
using file input to determine number of evens, number of odds, and number of zeroes using functions
 
Hi i have a project for my c++ class that has me stumped! The goal is to determine if numbers from an input file ("numbers.txt") are even, odd, or zeroes and to...
[14 replies] Last: > It is unspecified whether or not to count the number of digits, howe... (by ne555)
Symbiotic differentiation using recursion for c++. (1,2)
 
I was given an assignment by my professor and I still don't have any idea where to start or how to get started. Here are the prerequisites https://i.imgur.com/...
[21 replies] Last: Ah, yes, good point. +1 (by Duthomhas)
assistance with File I/O assignment?
 
Can some one get me pointed in the right direction? I know how to use variables, functions and loops, and have basic understanding of file I/O how do i get st...
[5 replies] Last: “s” is a meta-variable name for “string”, meaning, it is a str... (by Duthomhas)
March 2019 Pages: 123456... 9
  Archived months: [feb2019] [apr2019]

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