General C++ Programming - February 2017 (Page 5)

Rate my Program
 
This program counts the amount of words in a string: #include <iostream> int word_counter(char *); int main() { const int SIZE = 100; char user_string ; ...
[5 replies] Last: [code firstline=28] if(i != 0) { spaces++; } What is this suppos... (by doug4)
VS2015 error on PPP2 binary IO code
 
I'm trying to copy some code from the book that demonstrates binary I/O from files, but currently I can't get past the part where I have to open the ifstream wi...
[1 reply] : Also #include<string> to make the code portable, it seems your compile... (by gunnerfunner)
How to get compiler C++11
 
Hi all! Till now I work with compiler g++. I am a Linux user. Yesterday I found a file dealing with hash, in your tutorial. It doesn't work. I tried with g++ an...
[14 replies] Last: So I finished up following the procedure on the llvm webpage, and now ... (by TheIdeasMan)
"Friend" of my class :
 
I have a Circle class,and there are two derived classes from this base class. They are class: Sphere and class:cylnder. Of class Sphere - it has a public functi...
[2 replies] Last: OP: you could also consider containment in that both sphere and cylind... (by gunnerfunner)
Advice with C++ Calendar
 
Hi, I am a beginner in programming and need some advice on my program. I don't need it solved but I need a little help. I need help with a way to implement the ...
[1 reply] : I dont need a solve but a little help OK then I'll give you a little... (by gunnerfunner)
Program
 
The program will be divided into 3 files: main.cpp, player.h, and player.cpp player.h: This header file will contain the following organization sections (Separ...
[no replies]
help with verlet integration, extended RK2, extended RK4
 
Hello everybody, I'm a beginner to c++ and I havent done any complex numerical calculations yet. I need some help with verlet integration. I need to solve the ...
[1 reply] : Verlet integration ================== Amounts to a standard approxima... (by lastchance)
by mal24
Coordinate help
 
I need to make a program that will determine the closest distance between coordinates. I have coordinates (4, 3.5), (3.5,7), (7.5, 4) and (7.2,7.2). The user w...
[1 reply] : Have a class/struct to store a point. Store the static points in a std... (by integralfx)
Can someone help me with this problem? I'm having a hard time with it.
 
class node { public: int data() { return data_field; } node* link() { return link_field; } private: int data_field; node* link_field }; Suppo...
[1 reply] : That looks like a homework assignment, which part are you stuck with? ... (by Mantorr22)
struct within a struct and struct constructor
 
i have a question about constructor here is an example struct time { int min int hour; int seconds; }; struct person { string lastN...
[9 replies] Last: thank you for helping me (by ghost1111)
Stack around the variable was corrupted
 
Hi guys. I'm working on a program that needs to parse a configuration file and it seems to work when I test printing out the values again, but after printing, ...
[2 replies] Last: [quote=Peter87]Array indices start from zero so latticeConsts , lattic... (by Abbotta4)
Classes help
 
I need help creating object in main for class that accepts other classes as part of that class. Feel free to suggest any other fixes. Thanks! #include <io...
[2 replies] Last: Thanks! (by hockey34)
Reading PPM format images
 
I’m fairly new to C programming and I’ve been trying to figure out how to do this for 6 hours without any success. I’m trying to read this PPM format im...
[6 replies] Last: ^^ here's the article for that repository https://solarianprogrammer.c... (by Golden Lizard)
Hex to UTF-8 Conversion Issue C++
 
Hi all, I am converting hex to UTF-8 during that i am facing issue. Input: %3d%22BoatsGreat%22 Output: =?oatsGreat" Output should be : ="BoatsGreat" Code...
[8 replies] Last: does cin.getline(var, MAXALLOWED) work? (by jonnin)
Stack without libraries
 
I have programmed a stack without libraries, however I am finding it difficult to find the error i have made and also if there is anything else that i need to i...
[2 replies] Last: #include <iostream> #include <cassert> template < typename T > class... (by JLBorges)
by tahkua
Help with maze/robot program
 
Hey everyone, I'm having a problem with my maze/robot program and i would appreciate if anyone could help me figure out why I'm getting the errors I'm getting. ...
[3 replies] Last: how did the maze array i declared in line 15 know that you wanted to ... (by AbstractionAnon)
Character
 
The program should ask the user about the continuation of executing a program and the answer should be y or Y or any word or sentences starts with y or Y. w...
[5 replies] Last: You have two completely separate variables with the same name, yesOrN... (by Chervil)
BEGINNERS
 
please help me how to make a money changer using DEV C++.. thank you in advance guyss!! i really need it..
[1 reply] : First, I strongly recommend that you use an up-to-date compiler. Thi... (by mbozzi)
Need Help with Answer Counter and Unlock
 
So I'm trying to create a script that will unlock a physical box after a series of 3 simple math questions answered correctly. I managed to get the math portion...
[no replies]
February 2017 Pages: 1... 34567... 16
  Archived months: [jan2017] [mar2017]

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