General C++ Programming - February 2018 (Page 8)

help with my inputs (c-string)
 
Hey everyone, I need a bit of help with my program. For starters, whenever I input a class title that has a number for example: "Math 102" the add() function on...
[5 replies] Last: > Could do the same thing but with simpler code? No. Using the facil... (by JLBorges)
C++ vending machine
 
Create a program that simulates a vending machine. The vending machine offers three products: Soda, Juice, and Water Bottles. Soda costs P30, juice costs P23, a...
[1 reply] : why did you choose to become software developer one day? you need to ... (by hammerman)
by mynava
Pokemon Game - functions help needed
 
Edit: I realized i'm needing help on more than just one function. I think I may have fixed my original issue with the help given. My next problem is now workin...
[14 replies] Last: I'm not sure want to do with bool captureAttempt function. But I made ... (by rjphares)
Float Point
 
#include <stdio.h> int main() { float a=fabsf(0.7); if (a<0.7){ printf("C"); } else { printf("C++"); } retur...
[3 replies] Last: a fairly standard thing to do is if( fabs(a-b) < eps) //they are effe... (by jonnin)
Custom function in header issue
 
Test.h #ifndef _TEST_H #define _TEST_H class Test { public: void test(); }; #endif // _TEST_H Test.cpp #include <iostream> #ifndef _TEST...
[2 replies] Last: Ok thank you I will try that :) (by FlamingBurrito15)
Maze Generator Issue
 
My issue is on my main function: void generateMaze(string maze ) { int sCell ; getStarterCell(sCell); bool loop = true; int cCell = {sCell , sCell }...
[1 reply] : duplicated http://www.cplusplus.com/forum/beginner/230293/ (by ne555)
error with using namespace std
 
the program runs well for this header file. #pragma once #include"birthday.h" #include<string> using namespace std; class people { public: people(string you...
[6 replies] Last: clang++ emits a very clear diagnostic. MinGW64 6:38am /r/code/test ... (by JLBorges)
C++ coding on android?
 
Hello I want to code c++ on my android (because my laptop is not working) and I am trying to find an app that can help me. I prefer the following: *Allows i...
[2 replies] Last: Ok thanks I will try that (by FlamingBurrito15)
return C++ vector of objects in csv file
 
Hello, I need your help for return C++ vector of objects in csv file, I have the function below and I need also in the same function to retreive the liste of p...
[3 replies] Last: Something along these lines, perhaps: #include <iostream> #include <s... (by JLBorges)
Update function wont trigger
 
Using latest version of visual studio as of 9/02/18 on windows 10 Hey guys so basically im wondering why my update function doesn't work and keep updating. ...
[1 reply] : A user can enter their name, then hit return and get a list of options... (by CPPAWhile)
by geo28t
Palindrome
 
bool isPalindrome( string s ) { bool result = true; size_t begin = 0; size_t end = s.size( ) - 1; while( begin != end ) { if ...
[3 replies] Last: Not the most efficient solution but std::mismatch(std::begin(value)... (by elohssa)
Largest prime number program
 
I am supposed to create a program where you enter a number and the program tells you the largest prime number less than the one you entered. It works some of...
[2 replies] Last: https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes (by lastchance)
error: reference to non-static member function must be called
 
How would I go about to fix this error? The error occurs at line 60 with the message "error: reference to non-static member function must be called; did you mea...
[3 replies] Last: Please STOP deleting your questions after you've got an answer. It ru... (by MikeyBoy)
Grade Average
 
hi! i need a little help with this assignment from school. i have most of the parts done but i have a small error and i have no idea how to fix it. can someone ...
[3 replies] Last: okay so I tried it and i got it to work the way i want it. thanks doug... (by kristal630)
by youra
namespace
 
Hi all, I have the following code: there is a comment that indicates changes to be made depending on the version of GCC. What should I bring as a change. T...
[2 replies] Last: Thank you for your respense, I had the following error when i execute... (by youra)
by sreich
Determine the higher of 2 numbers
 
The following program has an error but I can't figure out what it is. The output should look like this: Welcome to Minimum and Maximum! Enter the first numbe...
[2 replies] Last: you are callin fmin and fmax with uninitialized data. They look like ... (by jonnin)
,
 
solved
[3 replies] Last: It works by magic. First you run the compilator to turn your code in... (by doug4)
Why do we need VoidT to enable SFINAE ?
 
Hi, I don't get it. Why do we need VoidT to enable SFINAE in the following code: // helper to ignore any number of template parameters: template<type...
[6 replies] Last: When I made the post, I hadn't noticed that elohssa had already answer... (by JLBorges)
chained list
 
hello, I develop under CodeBlocks 17.12, I want to make a chained list. That is the use of Class and Pointers, I was helped a little on other forum, but I have...
[1 reply] : I can handle written French passably... ( technical written French, l... (by Duthomhas)
How to automatically generate and store a Matrix with same diagonal elements
 
Hi guys, I am new to programming. Can you please help me with this. Okay, so I need to generate a matrix like this: A•x=b -2 1 0 0 0 (x1) ...
[4 replies] Last: Something like this, perhaps: #include <iostream> #include <array> #... (by JLBorges)
February 2018 Pages: 1... 67891011
  Archived months: [jan2018] [mar2018]

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