Beginners - May 2016 (Page 6)

howthe main () function that will request input for value in inch from the user
 
float convert_cm (float inch) { float cm; cm = inch * 2.54f; cout << "Inch : " << inch << endl << endl; return cm; } The a...
[2 replies] Last: See notes below, please make sure you read the tutorials. I would hate... (by tipaye)
DLL and linking problems maybe
 
Hello evryone firs of all what i am trying to do is to make a dll which hooks a specific process. when i write the code in one .cpp file all is fine, but whe...
[2 replies] Last: Sorry i am stupid as hell didn't add any guard at all in the .h file (by stampovaniq)
arrays and functions final
 
Okay this is my final assignment for my coding class, i know how to do mostly everything but the functions i hate so much, and everything i know needs to be col...
[5 replies] Last: oh and your code was very helpful! can you explain how you use the sen... (by bardo99)
110010101010
 
110101010110101001010101010100101010
[6 replies] Last: Okay sorry, i will do as you say. (by bardo99)
<> instead of ()
 
hello people I've recently been studying the stl library and I noticed a lot of the classes in the stl library take <> instead of () for example when I'm cre...
[2 replies] Last: thanks Moschops I'll read that now =) (by adam2016)
Classes and objects: Variables
 
From what I have understood declaring variables as public in a class is generally not good programming practice. Would anyone like to comment on the code below ...
[9 replies] Last: Not sure I can help with that. I'd need to study the algorithm which i... (by Chervil)
by Zorac
how to check if cin command from console worked (linux)
 
Hello! I have a program and that needs to read from a cin command in the terminal in linux. What i do is that i start my program like this ./sort <input.txt...
[4 replies] Last: I manage to get some help from a teacher and added C library with isat... (by Zorac)
by rrifai
cannot find issue with code
 
I need a program that allows the user to input the initial velocity in fps, the firing angle in degree, and the time increment. I then need the program to for a...
[3 replies] Last: Or even better because less changes to OP: #include <iostream> #incl... (by closed account 48T7M4Gy)
by Maru
Dice game not looping, & need help declaring winner
 
Making a Left Center Rigtht dice game, If someone rolls a 1(L), 3(C), or 5(R), then the player will pass a chip to the corresponding direction. But something is...
[1 reply] : You can't use the comma operator to chain multiple conditions you want... (by Peter87)
Vector Push_back of Array
 
So I got a vector of multidimensional arrays of doubles. The vector is created with this code std::vector<std::array<double, 3>> matrix; After this the vect...
[2 replies] Last: Thanks it worked fine. (by BeKinect)
Don't know how to save a file with 3D content
 
Hi everyone! I have a piece of code that compute a 3D shape. when I run this code, as a result it gives me a .raw file that I can't open it in any software. ...
[no replies]
Help me with my Text Editor(very simple one....)
 
Ok,so ive written a very simple program which inputs and outputs raw data from a file.The program compiles fine,but the function named Output() (in the File-Rea...
[2 replies] Last: Hi, It seems you are looping on eof for an output file? Will need to ... (by TheIdeasMan)
by Gector
Why doesn't this work?
 
Any obvious reason why this wouldn't work in visual studio 2013? #include <iostream> using namespace std; char words = "Test, The, Quick, Brown, El...
[3 replies] Last: Another non-standard quirk of Visual C++? Not necessarily, an impl... (by jlb)
Where is the function definition of system headers?
 
When we write a C or C++ code, it is very common we include system headers at the beginning, such as; #include <stdio.h> #include <stdlib.h> #include <stri...
[6 replies] Last: Thank you! (by buddha87)
by Jaif
Sign-up code
 
Hello everyone. This is login program, but all what's left is I have to create sign-up code - where for example I create text document where I all the sign up i...
[1 reply] : If you want to create a file then look at fstream.h header. http://www... (by MaBunny)
Iterators
 
Hi sorry If I'm been asking a lot of questions today I'm trying to get a lot covered haha One thing that is just wrecking my brain is the concept of iterators ...
[17 replies] Last: The idea is to have one consistent way to traverse ANY container. Not ... (by Arslan7041)
by N0N4M3
summation of arrays element problem
 
It should sum elements of the array of x from 135.1 to 24.1 and the output be 594.4 but the output is 570.3 which is the sum from 135.1 to 24.6 not 24.1 it work...
[1 reply] : #include <iostream> #include <iomanip> int main(){ double x = {135... (by ne555)
by ztse89
Help me with assignments
 
I have couple of assignments due within 12 hours. If anyone can do it, I will pay them. It is a intro class to c++ contact me
[2 replies] Last: What's your project? (by GabyValedon2012)
by pabs8
Program not behaving as expected.
 
Hi guys, I am working on an exercise whereby after reading in sequence of values, I need to print the total sum, the greatest and the smallest values. The cod...
[5 replies] Last: Peter, You're a genius, it worked!! I used double inf = std::numeric_... (by pabs8)
new program
 
is this a good program? i just wrote it for the super lottos plus #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { int y , t; sran...
[3 replies] Last: got any ideas how to check and guarantee non repeat of number? could ... (by programmerperson1)
May 2016 Pages: 1... 45678... 36
  Archived months: [apr2016] [jun2016]

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