Beginners - September 2014 (Page 36)

class
 
i dont know whats wrong in my code.. its factorial i dont know why the one or last number is not multiplying #include <iostream> #include <string> class Facto...
[3 replies] Last: nFactorial*=--j; I might split this line up, just to make sure it's ... (by mutexe)
by h4ever
strcpy error (1,2,3)
 
Can you tell me why I have error when I try to copy ch = strtok(ent->d_name, "."); char array from ch to chTmp? I did this according http://www.cpluspl...
[40 replies] Last: do I need to allocate the memory to files when I use pointers in stru... (by keskiverto)
Why default constructor is called
 
class BBB { string name; public: BBB(string name){this.name=name;} } class AAA { public: BBB b; AAA(string name):b(name){} } You know, at "...
[5 replies] Last: In Java all data members are reference variables Thanks. Now I under... (by gonny95)
by csharp
Array function help
 
Hello, I am trying to find the right code for this question, I am having problem understanding it changes’s job is to go through the array from beginni...
[9 replies] Last: The only difference between your code and mine is that while we both l... (by keskiverto)
How to compare strings?
 
Hello, In short, I need to compare strings using the '<' operator. Ex: " if (foo< bar) std::cout << "foo is less than bar\n"; " The way I understand it f...
[1 reply] : In my code, I have a string value that is already a const string&, an... (by keskiverto)
make a table
 
Hi, everyone. I just wanna know how to make all the variables output like a table. much appreciate
[1 reply] : If you're using 2D array, nested for might help (by LendraDwi)
Variablesand Constant
 
Hello guys! I am very new to C++ coding and I have a huge question. I believe you fellows can assist me. Well im currently developing a program and lets say thi...
[1 reply] : #include <iostream> int main() { // use double as the default fl... (by JLBorges)
Function
 
What is the correct answer and How is it calculated?. #include <iostream> using namespace std; int fun(float a, float b) { return a ...
[2 replies] Last: Thanks (by fazalhussainakbar)
What exactly is the use of tellp() tellg() and seekg() seekp()
 
I'm not exactly sure whether I have the concept of tellp() tellg() and seekg() seekp() right. I'm assuming it is to get a specific position in the file and assi...
[3 replies] Last: Thank you both for your responses. I understand the concept of these ... (by SomeAmazingGuy)
Is this solution cumbersome?
 
I have tiles that each four descriptions for leaving the room in that direction, for example if you walked north from x y, show that description. I am trying to...
[8 replies] Last: C++11 is often not enabled by default, you need to enable it for your ... (by LB)
Take percentage of each input as it is being input 2
 
When I run my program, I get the result I am looking for, however, I get a warning from the compiler that says: warning C4244: '=' : conversion from 'double' to...
[1 reply] : http://www.cplusplus.com/articles/jEywvCM9/ (by Avilius)
Mathematical Function Help
 
I'm a beginner coder (it's been a few months since I've written any however). I'm studying numbers and I'm just messing around with sequences of numbers and ...
[6 replies] Last: Thank you all for the replies, especially Yay295... I can't believe a ... (by t3hPoundcake)
Polymorphism \ Overloading
 
So I've been reading and watching a bit of videos about polymorphism but, would like to know how would it be effective in a practical program. I've been wo...
[2 replies] Last: Lines 32 and 33 are not overloaded. They are calls to int numberint(i... (by Yay295)
by gduong
dynamic memory
 
I am getting an error or uninitialized local variable 'size' used and i don't know why. Can someone explain it to me. #include <iostream> using namespace...
[4 replies] Last: Thank you. I got it. (by gduong)
Extracting digits
 
I have a homework assignment where I have to read an integer below 1000 and output the integer in terms of string EX: Enter a number <1000: INPUT: 405 You ...
[4 replies] Last: Yes I can, that seems like such an easy solution, thank you keskiverto... (by alex067)
by BB2921
If and Else troubles
 
I have to write a code to calculate a final grade for our class and it asks a few questions about your grades then it calculates. The problem lies that is if yo...
[6 replies] Last: thanks, that's what was wrong. (by BB2921)
Program won't display content of the file specified
 
Hello, every time i try to open a text file to display the content, it will create another blank file with the same name as the file that i am trying to open. ...
[4 replies] Last: when you open a new file to write you code, you save the file somewher... (by shadowCODE)
Question about forum
 
Hey guys, I would just like to know what I did wrong in this thread ( http://www.cplusplus.com/forum/general/141854/ ), did I violate any of the rules of the fo...
[4 replies] Last: Thanks, I was just unsure if I should add anything (hence the incessan... (by Cube777)
by stlund
Declare an object in another class. Bank system.
 
So Im trying to declare a object "Konto" on the Bank class, but the compiler complains:" Bank.h|11|error: 'Konto' was not declared in this scope|" What have I m...
[2 replies] Last: Thanks alot Peter! That fixed it! All the hour's I spent on that simp... (by stlund)
Assistance with pop function and exception handling
 
Looking for guidance on how to properly solve his HW problem . I can't seem to correctly use the pop feature or try/catch exception. I have been in contact...
[2 replies] Last: You haven't provided hwstack.h, so can't comment on any issues in your... (by AbstractionAnon)
September 2014 Pages: 1... 3435363738... 51
  Archived months: [aug2014] [oct2014]

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