Beginners - September 2013 (Page 41)

by hah49
read infos from files
 
hello guys .. i need to read some infos from a file .. like for example the name of a student , his ID number and his grade .. and when the user inputs the na...
[1 reply] : The <fstream> standard header will be very handy for such a simple tas... (by Aceix)
how to write this program in function.i am puzzled.
 
create a dynamic array of size n*n #include<iostream> #include<conio.h> using namespace std; void dynamicarray(int arrayy ,int n){ int **arrayy=...
[1 reply] : // first allocate the rows dynamically int** dynamicArra... (by IceThatJaw)
Arrays question
 
This is what I have so far but I was suppose to use a dynamic array not a normal one. How would I go about changing this to a dynamic array? #include <io...
[1 reply] : Syntax for "dynamic array": <type> <identifier>=new <type>[array size] (by Aceix)
switch/case inside of a dowhile loop; Not seeing case variables.
 
I am sure I am overlooking something here. Or there is a better way. More specifically line 20 and 23 my IDE is complaining... Use of undeclared varia...
[3 replies] Last: Final program. Just to follow up. For the sake of following up. #in... (by Bdanielz)
Can't get simple math to work
 
I'm brand new at C++ and extremely clueless. I can't get a simple math function to print out the correct answer in cout. The answer i'm looking for is 52/15 ...
[5 replies] Last: n/1 is how many 1s go into the number, which will return the number, n... (by Mats)
How to make default constructor appropriate for std::map?
 
I have a map of objects but I need to do something with the constructor apparently? No clue how this is done. Apparently I need to overload the < operator? ...
[6 replies] Last: operator< is the less than operator, which some containers need in o... (by Daleth)
program is runing but giving me wroung output.plz corrct me
 
how to initilize (N*N) matrix with random number in the range 1-9. #include<iostream> #include<conio.h> #include <stdlib.h> #include <time.h> const in...
[3 replies] Last: thank you dear (by Mehdinaqvi)
by Nebur
Read a line of numbers
 
Hi, I am trying to make a program in which the user enters a number n, and then, a line of numbers. i.e. -> 5 -> 1 4 7 6 2 0 9 is there any possib...
[2 replies] Last: [quote=Chriscpp]is there any possibility to store this numbers in a ve... (by Aceix)
Having trouble in adding using loop
 
What can i do ? The output of my sum is garbage value. what do you think is the problem ? //This program will record the #include <iostream> //pre-process...
[7 replies] Last: @OP check my edit at the top(2nd post) Aceix. (by Aceix)
how do i point to a method?
 
So i think its pretty clear from the code what I'm trying to do here. Thanks in advance to anyone who takes a look! #include <iostream> bool *pbTrue; ...
[1 reply] : nvm, problem solved with polymorphism (by MarketAnarchist)
by elfeck
Making class with vector<unique_ptr> copy-able
 
Hello, I've got a class with a member of type std::vector<std::unique_ptr<MyClass>> and I need it to be fully copy-able. I don't know how to implement a copy-...
[12 replies] Last: Doing B b = std::move(old.b) gives me Error 1 error C2248: 'std::uni... (by elfeck)
Help with homework, sorry im a Noob
 
Hi guys, I am taking a Begginers C++ course, and so far i have been able to grasp everything, but then he jumped into templates and arrays, here is what he ...
[4 replies] Last: You guys rock, but after trying all night I cant seem to figure out th... (by jsias99)
by Ch1156
Titanic Sinking Timer
 
i am making a timer that tells me how many seconds, minutes, hours, days and years ago the titanic sunk i am confused on where to start the calculation. It sank...
[1 reply] : One way, certainly not the only way... Epoch time is based on the num... (by SamuelAdams)
Class Constructors/Destructors/Exception
 
Hello everyone, It's not really a problem but rather a need for clarification. Coming from a C background, I understand only a little of the finer concepts o...
[8 replies] Last: > provided that non of them were initialized by the new operator. You... (by JLBorges)
Simple homework code doesn't work
 
Hello, this is my first code I have writen but it doesn't work. The objective is to print out second smalest number from user input. My code doesn't work if use...
[3 replies] Last: line 20 is one input. line 22 is another. and line 32. but no more... (by Manga)
by moreme
Declaring Objects of classes
 
Hey guys, Is it possible to declare an object with same name for two classes? for example: class A { }; Class B { }; int main() { A X; B X;...
[4 replies] Last: Well, it seems you guys are right. It does not work in the same scope.... (by Manga)
if statement
 
I'm trying to write if statement. But it comes out shows "[ _Elem=char,_Traits=std::char_traits<char>] Here's what I write. Thanks a lot. cout << ...
[2 replies] Last: Hello, as coder777 mentioned, you have to put an if after else, but i... (by moreme)
Recursive function problem
 
The problem isn't in code i don't how it works for example the output should be turn 1: 1->2 turn 2: turn 1 2->1 turn 2: turn 1: 1->2 turn 2: turn ...
[6 replies] Last: so on turn 2 even if its dskToMv =0 it should transfer to turn 3 and t... (by Sharan123)
PDF to Word Convertor or vice versa
 
Hello all, i want to code a convertor which could take a file (PDF , .docx) and convert it... Is c++ the better option if yes please share some resources ...
[1 reply] : read this: http://www.adobe.com/devnet/pdf/pdf_reference.html (by tath)
Beginner problem: I keep getting "no operator " <<" matches these operands."
 
#include <iostream> using std::cout; using std::cin; using std::endl; using std::string; int main() { string word; while (cin >> word); // read until...
[2 replies] Last: Worked, thanks. (by Megziflips)
September 2013 Pages: 1... 3940414243... 64
  Archived months: [aug2013] [oct2013]

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