General C++ Programming - April 2016

I have no idea how to do from 4 to 8
 
1. Prompt the user Enter a positive number or 0 to quit: 2. Extract the number into int n 3. If the users enters 0, the program should finish. 4. Otherwise,...
[2 replies] Last: #include "std_lib_facilities.h" int main () { int n; while (true) {... (by miguelarturo13)
how do I compute the sum?
 
1. Prompt the user Enter a positive number or 0 to quit: 2. Extract the number into int n 3. If the users enters 0, the program should finish. 4. Otherwise ...
[5 replies] Last: #include "std_lib_facilities.h" int main () { int n; while (true) ... (by miguelarturo13)
How do I do this?
 
Now onto the double my sine( double x ) function. 1. Use fmod to find the value of x mod 2*PI. 2. If the new x is negative, add 2*PI to it. (This is to ensure ...
[2 replies] Last: #include "std_lib_facilities.h" int main () { double x; char finish... (by miguelarturo13)
Infinite loop issue
 
Hi, I wrote this code but for some reason when I type any other letter aside for the choices provided it goes into an infinite loop. I am rather new to C++,...
[4 replies] Last: Thank you guys so much! (by Lori123)
Matrix of Objects: Boundary conditions
 
I have created a matrix with a class called Lattice. The lattice is filled with objects of type 'Dipole' which is created with another class. The problem I am h...
[no replies]
My output are only 0's?
 
I need values, but I'm not sure how? struct Time { int days = 0; int hours = 0; }; void normalize(Time); int main() { int i; int...
[1 reply] : So you know that n is uninitialised, and thus some random value, but y... (by Moschops)
counting a divisible number in array
 
Hello, I need to write a program that will create a 2d array and then allow the user to input a number, from there I need to count and list all the numbers in t...
[2 replies] Last: Thank you tipaye for your help and time, and for posting your own code... (by bluewizzard)
by anors
Sorting list usind STL
 
//In subject should be Sorting list using STL. I have list and I want to sort them in the ascending order list <Object*> objects; list<Object*>::iterator obj...
[5 replies] Last: On the first line you are attempting to construct a temporary list fro... (by cire)
Temperature Conversion
 
Hi! So I am working on a Final Program for a C++ class (you can expect other topics related) and I am trying to figure out why this portion of the program isn't...
[2 replies] Last: Thank you so much, I hate that it was that simple! I don't know if you... (by Stressed)
Array exercise
 
.
[3 replies] Last: > I'm not being able to get the last occurrence That's because you ar... (by ne555)
by setia
C++ to Pseudo code
 
Help me please, I don't really get how to write this into pseudo code. I need to submit this evening #include <iostream> #include <iomanip> #include <cstd...
[1 reply] : Double Post: http://www.cplusplus.com/forum/beginner/190140/ Please,... (by chicofeo)
how to represent Long multi-line string
 
Is there anyway to avoid colons in every line? I've seen something like const char* text = LR" ....... ....... ...... "; is this possible in c++?
[2 replies] Last: thanks a lot! (by sunsflower)
Could someone help me with this... im really struggling with this one.
 
Your band is playing a gig and has come up with a list of songs, which you have stored in a le called SetList.txt . The set list may c...
[1 reply] : What have you coded so far? (by chicofeo)
Problems in overriding CPropertySheet functions
 
I was previously using VS2010 and Windows 7, and was able to create and use Property Sheets with various pages. But now with VS2015 and Windows 10, things do...
[no replies]
Newbie Here
 
Hello :), I am fairly new to C++ and I was wondering if anyone could help me with a small project I would like to start. I want to make a chat room/file sharin...
[no replies]
Deleting Spaces from Cstring and returning number deleted (pointers, not array notation)
 
I am completely lost on how to finish this particular build. I have been tasked with building a function that will take a user input string, pass the argument u...
[2 replies] Last: Sorry for the late reply! I was able to figure it out with your help! ... (by Imhotep)
Object Files Slow?
 
Hello, I've run into a strange "bug" today. I'm writing a simple vector library for C. I mostly wanted to do this as a self-examination, but I'm running into a...
[3 replies] Last: Thanks for the help! -flto was exactly what I needed. (by MaxterTheTurtle)
dx/dy2
 
- Hello, im making a calculator that uses no cmath library, please help me, im supposed to have power,square root, fmin, and fmax, im confused about the fmin,fm...
[5 replies] Last: Hahahah, nice. And... Can i ask you something? do you have windows, m... (by motyas)
Sudoku Solver with Backtracking
 
Hello everyone, I am working on a sudoku solver program, and I am having a little trouble. I have been banging my head on the keyboard for about an hour now, so...
[6 replies] Last: Thanks for the tip. I am only implementing the backtracking as a stepp... (by haglerchristopher)
Inserting and Extracting data from **nodes
 
// I have to put value in character and frequencies in a following array of objects size two. But running the program is giving me error. What am i doing wrong?...
[no replies]
April 2016 Pages: 123... 23
  Archived months: [mar2016] [may2016]

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