General C++ Programming - May 2017 (Page 3)

Can't getline from a file?
 
I could really use some assistance. I tried talking to a tutor, a TA and e-mailing the teacher(hasn't gotten back yet). I'm working on this for a class and I ca...
[2 replies] Last: Thanks for the response! The assistant I was working with tested it by... (by Kurokami)
Error In A Program For Hangman Function
 
Hello, I am wondering if anyone could help me out on what the error is for the following program, I feel stupid asking because it seems simple. This is some of ...
[4 replies] Last: You have been asked to use code tags. PLEASE DO SO. http://www.cplusp... (by AbstractionAnon)
by Kalcor
The use of this condition
 
DZY loves chessboard, and he enjoys playing with it. He has a chessboard of n rows and m columns. Some cells of the chessboard are bad, others are good. For e...
[6 replies] Last: Thanks everybody! (by Kalcor)
by SoloCc
I need help Fixing this code
 
#include <iostream> #include <cstdlib> #include <ctime> #include <vector> #include <fstream> #include <iomanip> #include <string> #include <sstream> #include <...
[3 replies] Last: What is the problem anyway? can't seem to detect it by myself when tri... (by benhart)
Macro usage with variables names
 
Hi, I am trying to debug a software by printing out the values of variables. However, I am having syntax error issue. Any advice ? error: ‘class Vcordic_p...
[6 replies] Last: I don't have the definition of Vcordic_pipelined, but the following co... (by AbstractionAnon)
by Kalcor
Simplifying this proof/method
 
Question: Drazil is playing a math game with Varda. Let's define for positive integer x as a product of factorials of its digits. For example, . First, they...
[1 reply] : Understood it, marked as solved! (by Kalcor)
2 D array of list<char> both static and dynamic
 
Can someone help me out with defining 2D array of lists. Given a string I was asked to print longest palindrome subsequence. I could print length using dynamic...
[no replies]
Class Assignment File Saving (LOOPS)
 
Hi! I need help with saving data into a text file. What I did won't work and I'm not sure what I'm doing wrong. I just need the results to save into a separate ...
[2 replies] Last: Duplicate: http://www.cplusplus.com/forum/beginner/216423/#msg1003337 ... (by TheIdeasMan)
EXC_BAD_ACCESS(code=1 ,address=0*8) in getting vector.size() function call
 
i am using c++ in Xcode, i had import <vector> in .hpp file, all other function working properly i had declare vector in track class in track.hpp class...
[1 reply] : Hi, Did you create muteevent with new ? deleting something not creat... (by TheIdeasMan)
constructor
 
will constructor automatic inherited by child class?
[2 replies] Last: Just to let all know the OP is a known troll. (by TheIdeasMan)
KHR/khrplatform.h
 
Hi, Am trying to solve this problem that unfortunately has surfaced in my program. My program is to start an OpenGl platform, but then I launch it I get the er...
[6 replies] Last: Will apply it and see. It begs the question why the system file isn't ... (by technologist)
Error, request for member is of non-class type?
 
while(!input.eof()){ input.get(search, 100, '\n'); if(search.find(keyword) != string::npos){ cout << search; Is what I'm mostly worried about. I'm trying ...
[1 reply] : but if anybody knows why I can't run str.find It fails because "sear... (by jlb)
Text based rpg examples
 
Hi, I would like to show you guys a text based rpg that my friend and I made, it involves 2 guys dueling till submission with the values being random. Please ...
[7 replies] Last: I think there is just too much recursion in your program, even without... (by doug4)
Array of files problem
 
i am currently studying files i c++. Can someone tell me where is the problem in this simple code. #include<iostream> using namespace std; struct library { ...
[2 replies] Last: 1. What does this code have to do with files? 2. Please edit you po... (by doug4)
by Domcys
Need help
 
Hello guys, i'm new here and looking for help. I am stuck with one assigment, and run out of time with it. Need help fast. Assigment is: Create a c++ program...
[4 replies] Last: I am not sure your numbers version works like you think it does. You ... (by doug4)
The purpose of classes
 
This isn't so much of a technical question as it is a question on programming practices. I understand what classes are in the sense that they are basically a...
[2 replies] Last: It all depends on what your program is doing. There are few programs ... (by AbstractionAnon)
Absolutely LOST in making Snake
 
As a diversion from my regular learning, I was making a game of Snake using NCurses. However, my Snake class below is completely not working and I have ABSOLUTE...
[2 replies] Last: Thank you, you are a genius. I can't believe I didn't realize that mis... (by RUNNER PRO AGARIO)
My problem here is that, it cant display the name and average of student with the highest and lowest average. Thank you guys!
 
#include<iostream> using namespace std; struct student { char name ; int score ; float ave, total; string remarks; }stud ; main() { f...
[7 replies] Last: Thank you guys for the help! (by ImCristal)
by Kalcor
T-Primes
 
We know that prime numbers are positive integers that have exactly two distinct positive divisors. Similarly, we'll call a positive integer t Т-prime, if t ha...
[1 reply] : Hint 1: Sieve of Eratosthenes https://en.wikipedia.org/wiki/Sieve_of_E... (by JLBorges)
UDP
 
I'm creating a udp server code in C++ but I keep getting an error in my if statement with "sscantf". I keep getting an error and warning saying that it is not ...
[2 replies] Last: you can use c++ strings just as easily here. Or stringstreams. Or a... (by jonnin)
May 2017 Pages: 12345... 14
  Archived months: [apr2017] [jun2017]

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