Beginners - August 2016 (Page 9)

function help
 
Trying to write a function that takes two parameters. Getting some errors: Here is the function two_parameters(int a, int b){ int total; ...
[2 replies] Last: If you have a function which takes two parameters then it would normal... (by closed account 48T7M4Gy)
how to modify variable permanently
 
if i wrote a code that declares the variable 'x' as 4 and then made some operations on it and made it equal 12 for example and closed the console and run the pr...
[1 reply] : Try persistent memory locations, or even go so far as to use hard disk... (by closed account 48T7M4Gy)
beginner simple calculator help (ez)
 
just wrote a simple calculator console application and was wondering what I could do to improve it. #include <iostream> using namespace std; int a...
[2 replies] Last: Interestingly division by zero can be handled several ways - directly ... (by closed account 48T7M4Gy)
c++ array illegal or legal?
 
Hi i'm a beginner in c++, recently i found out there's legal and illegal array practice. i wanted to know if this code here is illegal or legal. i have a displa...
[10 replies] Last: Rather than the smoke and mirrors approach of picking up a snippet her... (by closed account 48T7M4Gy)
Printing some Japanese text on the console
 
http://stackoverflow.com/questions/2492077/output-unicode-strings-in-windows-console-app
[no replies]
just got back into learning c++ after about 2 years, how can i improve this
 
well it works as i want it to, however there can be some improvements, such as when you enter the amount and press enter, it adds a value to the variable, but w...
[4 replies] Last: the if's do catch it, however if i press one of the function keys i ha... (by gokitty)
Variable Not Intialized?
 
Quick question. Can anyone explain to me how my variable (feet) is not initialized? #include <iostream> #include <string> using namespace std; void Feet2Inc...
[6 replies] Last: double Feet2Inches (double feet){ return feet * 12; } int main(){... (by ne555)
Having trouble assigning values to a dynamically alocated 2d array of string pointers Edit topicMark as solved
 
So I'm having trouble with assigning values to this array, here's my code: //Adventurer.cpp string item = "YEAH"; int rows = 50; int cols= 2; int ...
[2 replies] Last: Duplicate: http://www.cplusplus.com/forum/general/196018/ (by cire)
by MAhmed
Child class and Parent class
 
i'm calling function "output" from other classes to other classes as you can see below but i'm receiving errors on line 21,32,44 please checkout :-) #inclu...
[2 replies] Last: Lines 21,32,44: Those are not valid function calls. To call a functi... (by AbstractionAnon)
by MAhmed
Help me \
 
on line 58 what is the work of "sqrt"? #include<iostream> #include<math.h> using namespace std; class math { public: int menu,l,w,r; int circle, re; in...
[2 replies] Last: Lines 57 and 58: Heron's formula. https://en.wikipedia.org/wiki/Heron%... (by Chervil)
How to array string and int from text file
 
text file: eric 1234e 110 3 minwei 1234m 540 3 the problem is 1>startmenu.cpp(471): error C2040: 'id' : 'std::string ' differs in levels of indirection ...
[2 replies] Last: Thank you! i got it to work now :)) (by pminwei)
How to replace a line in textfile: Please help D;
 
Im trying to make a account text file fp>>id>>pw>>score>>unlocked; the text file looks like this 111 123 99 2 222 222 70 2 333 321 80 2 lets say i "lo...
[4 replies] Last: Great idea! THank you it worked! (by pminwei)
Problem by erasing duplicates from vector
 
I have this vector intersects, which stores the coordinates of intersection points (xyz-coordinates). Because I receive duplicates I want to erase this duplicat...
[2 replies] Last: std::array<> is LessThanComparable if its value_type is LessTha... (by JLBorges)
Controling ip camera
 
Hi everyone, I'm working in a c++ project at the university in which I need to control an ip camera. It's possible to control the camera by sending HTTP comman...
[1 reply] : OpenGL doesn't make any sense what so ever here, that's a rendering li... (by Computergeek01)
by RobCh
gluLookAt() or other?
 
I need to be able to have a camera go about YAW, PITCH and ROLL viewing rotations. The code I have below deals with YAW and PITCH perfectly, but roll is far mor...
[1 reply] : Oh, look at that, I think I have solved it. It seems glRotate() was th... (by RobCh)
code for complement program
 
i need dev c++ program which find complement using array
[1 reply] : Please explain what the program should do in more detail. What are the... (by dhayden)
Convert raw image data to lossless PNG or TIFF?
 
Hello, I've got some files dumped from radiographic software and apparently made up of raw data, 2 bytes per pixel. Since I can't open them in any image e...
[2 replies] Last: There was a question, why does its image size behave so that it had t... (by Chervil)
If statement with two conditions?
 
I'm having trouble figuring this out; I want to have the following if statement, with two conditions, run only if both strings match. I know that || is OR, and ...
[2 replies] Last: This works brilliantly, thanks. (by Alaanor)
"Graph.h" from Bjarne Stroustrup not working
 
I am learning Chapter 12 of "Programming - Principle and Practice (Second edition)" and I met some problems while doing its Drill. After I include "Graph.h", ad...
[5 replies] Last: Glad to hear it man. I'll leave it up, or if someone wants to publish ... (by Yawzheek)
new to the forum...need homework help
 
I am writing code in C++ for a class project. I am writing a program that checks the first 12 digits of an ISBN-13 number. Given 12 numbers it will calculate an...
[4 replies] Last: To convert the integer back into a string? Sure, that can be done as w... (by JayhawkZombie)
August 2016 Pages: 1... 7891011... 22
  Archived months: [jul2016] [sep2016]

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