Beginners - June 2015 (Page 6)

Code::Blocks 13.12 problem
 
What is wrong? I get this message from the "Build messages" tab: In function `_startĀ“: undefined reference to `mainĀ“ main.cpp #include <iostream...
[1 reply] : Line 11: // return file return file ; // *** add missing semicolon ... (by JLBorges)
Best file and record structure for a file
 
I am 64 and started learning c++. In the late 1970s I wrote several programs used commercially in compiled BASIC. I created an input routine that got a charac...
[10 replies] Last: I think almost all code is written with the help of some sort of IDE t... (by dhayden)
by Kalist
Typedef function pointer?
 
What is the purpose of this? And how does it work? I am currently writing a DLL injection using the WINAPI, but I stumble across being told having to apply the ...
[7 replies] Last: > Is there a way to avoid declaring that silly typedef? >> I don't nee... (by JLBorges)
computing should continue until summation of individual digits of a number less than 10.
 
given big number should be added one after another until it sum of output reach less than 10. input say 456789 i should manipulate in code like 1.4+5+6+7+8...
[3 replies] Last: No i want to add individual digits only. THis will be individual dig... (by MiiNiPaa)
Finding the Height of the Node
 
I got the following code from a youtube video. I am trying to understand this code, and I'm having a difficult time. And I'm not sure what the max function woul...
[3 replies] Last: It is helpful to look into common and terminal cases: common case: hei... (by MiiNiPaa)
Why don't "a" and "b" have equal values of 20?
 
Why don't "a" and "b" have equal values of 20? Since "p1 = p2," and " *p1 = 20 " essentially means " a = 20, " I assumed a = 20 and b = 20, but the actual r...
[3 replies] Last: Because if you go step by step through your code there is no reason fo... (by shadowmouse)
Simple problem.
 
Hey! I have a simple problem to solve and I encounter an error in the code I wrote. Could you tell me what is wrong with my particular code or if it`s fundamen...
[9 replies] Last: Thank you. Finally fixed it. I kind of forget to write "==" in if stat... (by Georgge)
returning multiple boolean functions
 
Can someone explain me this piece of code , the function isSafe is supposed to check the other three functions if they are false or true , if one is false isSaf...
[3 replies] Last: thanks for help guys , i understand now (by closed account E3h7X9L8)
by jaja
Financial Application (Comparing loans with various interest rates)
 
I have some problem with below, I hope that i can get some hint Write a program that lets the user enter the loan amount and loan period
[2 replies] Last: Made some changes so at least you don't have infinite loops running. ... (by CodeWriter)
MVSE13 Problem!
 
I am using Microsoft Visual Studio 2013 (MVS13), I already tested this script and it works! The problem is the window closes to soon after I input my age. I alr...
[2 replies] Last: or just use control-f5 start your project. (by Bdanielz)
by Yulia
Cant seem to understand declarations in header
 
on my understanding headers should contain declaration and its definition will be on the cpp. bool IsTrialEndAward() { return ( m_emTrialState == TRIAL_...
[1 reply] : It appears to be an (implicitly) inline member function. 2) A funct... (by JLBorges)
Beginner programmer
 
Hi, I'm 14 year old, and I always wanted to program, I started with HTML and it's basically the easiest language . I wanted to look for a low level language a...
[4 replies] Last: Anytime... (by TheSLY)
Count the number of class
 
Hello everyone, assuming i have the Class Animals and i have created 3 instances of animals: Animals cat; Animals dog; Animals bird; how can i count ...
[8 replies] Last: Thank to all. Very interesting. I will study carefully (by Amiplus)
by dane37
Allocating too frequently? C string needed?
 
Objective: learn about parsing in general and strtok() in particular. Progress: I started with the example on http://www.cplusplus.com/reference/cstring/strt...
[4 replies] Last: Thanks to all three of you. I'm glad I asked. I learned much from yo... (by dane37)
After defining friend function, can't access the private variable of a class
 
I've written a simple employee management project. I am facing problem when I am trying to assign values into the private variables of a class though I defined ...
[3 replies] Last: I can access to Person class data using operator<< You do not access... (by MiiNiPaa)
Double Vs. Float
 
Dear reader, Hello I am 15 and new to C++ and I have a newbie question. What is the difference between "double" and "float"? Thanks, FireCoder. #inc...
[1 reply] : http://www.learncpp.com/cpp-tutorial/25-floating-point-numbers/ (by AbstractionAnon)
char vs. string
 
In the past I have programmed in BASIC but am trying to learn some c++. So I might write a program in BASIC and then translate it to c++. But BASIC and C++ seem...
[2 replies] Last: @mutexe, Thank you that fixed it. A bad habit due to BASIC giving an ... (by CodeWriter)
How would I be able to put these together?
 
Instead of calling in two different pointers to new; how would I make an instance where I just need to call one in. Instead of creating sepreate u and p just ca...
[6 replies] Last: Thanks @MiiiNiPaa that is exactly what I was looking for. (by Blackhart98)
by Winsu
Pointers
 
When is it neccesary to implement a default constructor,a copy constructor,an overloded assignament function and a destructor for a class?. This is a quiestion ...
[6 replies] Last: Ok, I'll have a good look, thanks!! (by Winsu)
How are objects initialized when they are used to initialize a STL container?
 
class t { public: int i; t() { i = 44; cout << "Ordinary\n"; } t(const t& x) { cout << x.i << " Copy\n"; } }; Given that class, if write t...
[5 replies] Last: Thanks a lot... (by PSYCHAMERON)
June 2015 Pages: 1... 45678... 32
  Archived months: [may2015] [jul2015]

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