Beginners - March 2017 (Page 20)

by IneedC
Else without If
 
I was working on my If statements and watching a video that goes along with it. I am almost certain that my nested if statement is exactly identical to the tuto...
[8 replies] Last: your problem was already explained, but to answer: there is nothing e... (by jonnin)
Reversed number
 
I've got to display all of the prime numbers(the numbers MUST have 4 digits),which's reverse is still prime. Example:1009(prime)----9001(still prime),so I will...
[2 replies] Last: Here's how you would print out the reverse of an int. #include <cmat... (by integralfx)
Something that I do not understand about member functions in Classes.
 
I need someone to explain this to me because I am slightly confused. When using public member functions I thought that all the member functions would in a way s...
[3 replies] Last: Thanks guys, That helped :) (by MisterTams)
by pumzye
ADT class not compiling
 
Hello Guys Thank you for helping me, my ADT class is not compiling , how do i fix it ? regards //Define a class Player as an ADT that uses sepa...
[9 replies] Last: [quote=Jib]you really only want close friends to have access to your p... (by LennisTheMenace)
PATTERN PRINTING
 
I am getting an error on line 32 and I am not sure why assignment: Write a program that uses nested loop or for statements to display Pattern A below, followed ...
[3 replies] Last: Hello cristina999, Upon further investigation I found that the for lo... (by Handy Andy)
First n prime numbers
 
I've got to display the first n natural prime numbers,n being introduced from the keyboard. Example:n=5 There will be displayed 2 3 5 7 11 I've got no idea h...
[1 reply] : You already had: http://www.cplusplus.com/forum/beginner/210934/ If t... (by keskiverto)
Tracing recursion better
 
Hi everyone. I'm currently learning recursion in college right now (not asking to help solve hw) and I have an assignment that I've completed. I just wanted to ...
[3 replies] Last: You only need one parameter: the number of stars in the line: // Draw... (by dhayden)
Prime numbers
 
I've got to display all of the prime numbers in the [a,b] interval,where a and b are introduced from the keyboard. int a,b,n,i,k=0,j; cout<<"a=";ci...
[2 replies] Last: I am here just to say about efficiency. This is not efficient algorith... (by bokisof)
Text editor in vc++
 
Hi everyone! I need a good tutorial about creating a text editon in vc ++. Actually I need to "send" data in a notepad every time I write double numbers on edi...
[5 replies] Last: CString buffer; CEdit *pEdit = (CEdit*)GetDlgItem(IDC_EDIT1); pEdit-... (by Thomas1965)
Derived class doesn't call base class default ctor
 
Hi guys. Here is the code #include "stdafx.h" #include <iostream> using namespace std; class A { public: A(){ cout << "default constr A" << ...
[5 replies] Last: http://stackoverflow.com/questions/21558/in-c-what-is-a-virtual-base-c... (by closed account 48T7M4Gy)
How to prevent file.open() from displaying file's contents
 
I am a beginner to C++, so please keep it simple. I am currently learning how to work with files, and when using file.open() [Supposing file is a variable that ...
[5 replies] Last: What he is saying is that the act of opening a file does not display i... (by jonnin)
QByteArray stores wrong value;
 
i have this code QByteArray id = "\x98\x33\xB5\x14"; the problem is when i qDebug() id it show that the contents is "\x98""3\xB5\x14" ...
[3 replies] Last: It is not the wrong value. Read the documentation for QDebug::operator... (by Peter87)
What is the difference between an array and a sequence?
 
I know what an array is, I recently learned what my professor calls sequences, they are basically arrays but with pointers. I will give two examples of code, on...
[9 replies] Last: arrays vs sequences is interesting in that mathematically they are the... (by closed account 48T7M4Gy)
Finding the the sum of n amount of cubes
 
I am having difficulty writing a function for my program. I have to first ask the user to type in an integer. The user types in any integer, and the value is st...
[6 replies] Last: ^ is xor, a logical operation. you want pow(n,3) or n*n*n (faster, po... (by jonnin)
How do i Pass values from one array to another?
 
hi there, i was making a program that segregates numbers that are divisible by 2 3 and 5. everything seems to be working out alright but the numbers that appear...
[2 replies] Last: Hello redhood, PLEASE ALWAYS USE CODE TAGS (the <> formatting button)... (by Handy Andy)
Need some output formatting help!
 
I just need some quick help on my formatting. I've been spending way too much time and not getting the result that I want. Here is my code. #include <iostre...
[1 reply] : setw(19) << "TOTAL COST" try increasing this number from 19 to shif... (by gunnerfunner)
Date Class - Invalid Inputs
 
I need to create a member function that checks for invalid date inputs as well as leap years. Any help would be greatly appreciated. #include <iostream> ...
[2 replies] Last: OP: upon some further thought ... entering input in the order year -> ... (by gunnerfunner)
How to accurately measure the runtime of a C ++ program with small input data
 
Dear forum members! I have seen some discussion on how to measure the running time of a C ++ program on my forum, but the input data must be large enough. Can y...
[2 replies] Last: Sincerely thank you! You have a very smart way, which I did not think... (by cegodica)
Function not working...
 
Write your question here. I am up to the third part part I have to have my name print the amount of times that the two largest variables added up to, and I'm a...
[1 reply] : line 22: You don't have a parameter in that function, and there's no n... (by arbwok)
by arbwok
A program that mimics an OS
 
So I have to write a program that mimics the operating system, such as having PCBs, ReadyQueues and DeviceQueues. Devices and DeviceQueues is where I'm having t...
[no replies]
March 2017 Pages: 1... 1819202122... 36
  Archived months: [feb2017] [apr2017]

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