Beginners - October 2015 (Page 17)

by reddcl
Is_prime function How to make 3 cout is prime?
 
How to get my code to cout 3 as a prime number. When any and ever other number works correctly except #3 #include <iostream> using namespace std; bool...
[1 reply] : -W{all,extra,pedantic} foo.cpp:15:13: warning: using the result of an... (by ne555)
by qia360
Help: Error: active developer path
 
Hi, im a newbie trying to compile a simple "Hello World" program. i have no idea what seems the problem here. i have this error. g++ -Wall -fexceptions -g ...
[2 replies] Last: thanks.. (by qia360)
fourier transform
 
Write your question here. please i need to understand about Fourier transform and the code which i used in this topic and that do this code means #inclu...
[1 reply] : Respectfully, if you don't know the very most basic stuff about C++, y... (by Duthomhas)
by reddcl
Prime Number Function
 
Trying to make a program with functions that determine if a number is prime or not. New to code and never used functions before, what is wrong and what shoul...
[2 replies] Last: Thanks Kevin C i figured it out shortly later last night.. This websit... (by reddcl)
Delete Tree not working
 
I have the following code in my class to delete the entire tree. void Tree::makeEmpty() { clear(root); } void Tree::clear(Node* current) { if(cu...
[3 replies] Last: Line 15 is not doing what you think it does because you have line 6 wr... (by fg109)
Trouble with opening a file.
 
Hello, The code snippet below is part of a homework problem I'm doing for class. I've re-worked code and searched the internet for close to an hour hoping to...
[1 reply] : std::ifstream input3(sExecutable, std::ios::in | std::ios::binary); /... (by MiiNiPaa)
Restart A loop if Y/N
 
using the bool continueYN what code and where do i need for the program to restart if 1 is pressed and to quit if 2 is pressed? Also if someone could look at th...
[1 reply] : PLEASE USE CODE TAGS (the <> formatting button) when posting code. It... (by chicofeo)
Need help writing code so lost in C++
 
our program should present a menu with 4 options, 1) Print author info 2) perform integer operation 3) perform floating point operation 0) Exit Where se...
[no replies]
by tacox5
Secant Method Root Finder Loop Question
 
I tried to convert my secant method root finder to use a do-while loop but I can't get the answer I am expecting to get. Could someone help me fix my loop. ...
[1 reply] : > I can't get the answer I am expecting to get then you should say - w... (by ne555)
iPow function does not execute
 
Hello I need help my iPow function does not seem to calculate the inputs. The program is just a simple program to calculate x^n . However I need to use a funct...
[3 replies] Last: Thanks guys appreciated. It works fine now. (by Hardisius)
A loop without if statements
 
I need assistance to make a for loop that prints out 1,4,7,11 by doing a cout of the counter only,and it has to have only those values, no if statements, I have...
[5 replies] Last: thank you! guys this helped me out a lot (by RGB 455)
Please help My code is not working
 
The program compiles with no error but i don t get the correct output. // Header file for Cpu scheduling #ifndef cpuh_h #define cpuh_h #include<iostream>...
[6 replies] Last: //Application file for cpu Scheduling #include "cpuh.h" using namespa... (by abdelboch)
by Winsu
I don't understand this
 
Whe I see this code I would expect something different , I cant understand the meaning of the static variable...I see well the meaning when it's a member data.....
[7 replies] Last: what I keep without understanding is....why the global variable is ma... (by jlb)
by haz94
Vectors & Objects/Classes
 
Hey guys, I require some assistance with vectors & classes. A bit stuck so could use some guidance. I have a class called Collectable. At the moment within th...
[6 replies] Last: Thanks for the help AbstractionAnon! I re-did the class and thought a... (by haz94)
How to Print Odd Random Int
 
what is the code I would use to print 200 random int, 20 rows and 10 columns format? 23 srand(time(0)); 24 25 for(int c = 1; c <= 200...
[5 replies] Last: Ive figured out how to print random ODD INT but cant get the rows and ... (by cpluswut)
My code isn't working properly, can't find the error.
 
This code determines if the following brackets are balanced or not. But for some reason in the third case, is marking it as unbalance and it supposed to be bal...
[3 replies] Last: Thanks for taking the time to help! The problem was sizeof(s), I chang... (by CJM0929)
by shome
read a txt file line by line forward or backward
 
I need to read a txt file line by line. On pressing the right arrow buttton it should read the next line. On pressing the left arrow button it should read the...
[3 replies] Last: Load fs as a vector of line strings. fs.open(argv ); vector<string> l... (by kevinkjt2000)
Why is cin.getline inferior than getline?
 
I've read that cin.get() and cin.getline() are methods that work on C-strings and that getline(cin, variable) from std::string is better. Is there a reason not ...
[8 replies] Last: all my strings are of type std::string cin.getline You cannot pas... (by MiiNiPaa)
Heap sort not functioning properly.
 
I have a heap sort function with cstring keys for an assignment. It seems to work with some sets of data but not others, and I'm not sure why. Below are the fun...
[1 reply] : Your makeHeap()/reheapUp() algorithm is incorrect. reheapUp() should n... (by Duthomhas)
Exception handling
 
Hi I'm trying to get a grip on exception handling and am going nowhere. I picked a simple beginning error that I've had when coding: Getting an integer inp...
[11 replies] Last: Oh. Okay. Thanks, I think you've covered it all. Much appreciated (by peter5857)
October 2015 Pages: 1... 1516171819... 57
  Archived months: [sep2015] [nov2015]

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