Beginners - January 2017 (Page 5)

Floating exception (core dumped) error
 
Hi, I get the error 'floating except (core dumped) at the end of this program when I run it. EX: I input 2 for labs and input a 4 and a 6 for points. At the...
[2 replies] Last: Hello crowandrabbit, To expand on what Chervil said. Line 6, I would... (by Handy Andy)
Increment error
 
Increment error please help!!! #include<iostream> using namespace std; main() { int a=7; cout<<a++<<a++; cout<<a; } The output of the progr...
[6 replies] Last: @suksham By the way, do you used the paid version or free version of ... (by boost lexical cast)
recursion function
 
how to write a program that do this ? i need help please {2*f(n-3) +f(n-2)+f(n-1) x>1} {1 x=<1} A. A: What is the result of ...
[3 replies] Last: #include <iostream> using namespace std; int f( int n ) { if ( n ... (by lastchance)
by Alks
Simple 'delete []' ptr ownership question
 
Basically I'm just asking if this works: int* ptr1; if (true) { int* ptr2 = new int ; ptr1 = ptr2; } delete ptr1; Sorry for the sim...
[8 replies] Last: cire: you're right ptr2 being in the inner scope indeed (by gunnerfunner)
Same 'thing' gives different outputs
 
Hi, I'm having trouble with the int lab() part, specifically at the end, when I put in my calculations. What I'm trying to find is the average points of whateve...
[6 replies] Last: Thank you, I just got it by adding r = (points*labs)/labs*10 inside... (by crowandrabbit)
Multiple Functions
 
My program will not work. I have tried numerous times to change things but it still wont work. Can someone please help me with this program. #include <iostre...
[1 reply] : From a glance I see you got some rogue brackets. You should use the co... (by Golden Lizard)
Classes and for loops: num[i] only storing one set of inputs?
 
I'm working with creating a weighted average calculator using classes. Everything is working fine, except that, in the main function, I'm trying to print out...
[1 reply] : The correlation of the names and the grades does not work that way. Yo... (by coder777)
segmentation fault (core dumped)
 
I keep getting 'segmentation fault (core dumped)' what is causing it? How do I fix it? #include <iostream> #include <string> #include <fstream> #includ...
[2 replies] Last: Thank you so much (by bamboojack)
I dont know how to write the code of the following code
 
write a program to display the no which are divisible by 3 or 5 and add it
[6 replies] Last: @AbstractionAnon thanks a lot the code works after one change in it ... (by callmegeek)
question about Dietel exercise
 
I have started taking my first course in c++. I'm curious why I the program won't run if I don't initialize the int variables with a value. If I write "int m...
[5 replies] Last: Thank you for the reply! Sorry if I seem slow, but just to clarify, b... (by chinaski)
If Statement Not Working (1,2)
 
Every time I enter 1,2,3 it still gives me the cout for the first one. #include <iostream> #include <string> using namespace std; void MainIntro() ...
[21 replies] Last: it returns to the menu. All functions return to the line after th... (by closed account 48T7M4Gy)
by irasw
Visual C++ Database Programming
 
Been out of the C++ loop for a few years. I did some C++ database programming a while back, and just wondering what is the current preferred method of connecti...
[no replies]
by simer
Stop reading numbers from a file
 
How to stop reading numbers from a file? Example I have 30 numbers in file, maximum size I give is 100. The program still read until 100 although it has onl...
[8 replies] Last: It works! Thank you JLBorges! (by simer)
Trouble with a counting if statement
 
I put together a little code to test colors and I'm not really sure whats wrong. I had the system output the value for the a variable as well but I'm still not...
[1 reply] : Try something on these lines: #include <iostream> #include <Windows.h... (by gunnerfunner)
how do i line up my code
 
How do i make my output look like this: Please enter the Quantity desired: 5 Please enter the Unit price: 10 The Quantity desired is : 5 The Unit Price i...
[2 replies] Last: #include <iostream> #include <iomanip>//for stream manipulators usin... (by gunnerfunner)
Dont know what is wrong with my code
 
Can someone please help me with this code. #include <iostream> using namespace std; int main() { // This program calulates the unit price. // Writt...
[8 replies] Last: It Worked! Thank you (by jvardam)
Can't figure it out...
 
Hey, i get a couple of errors in my code here and i can't seem to figure it out how to solve them. #include <iostream> using namespace std; class Person ...
[7 replies] Last: Hello elliotawerstedt, The error on line 46 is because you are trying... (by Handy Andy)
homework help
 
.
[4 replies] Last: thank you I got it to work now. (by sam9623)
Loop to open a file, and check it until the right name inserted
 
Hi! I'm a beginner and have an assignment at school. And obviously I have a mistake somewhere, and I can not see where=) I tried to rewrite everything from the ...
[7 replies] Last: You are so right! That was exactly what I missed. Now it works) Thank ... (by amayakichi)
January 2017 Pages: 1... 34567... 24
  Archived months: [dec2016] [feb2017]

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