Beginners - June 2015 (Page 23)

by Elidor
Linking Problems
 
I am unable to understand why my program is unable to find a private static variable within the class it is defined in. From the terse output of the linker all ...
[2 replies] Last: Thank you so much. I had seen something about having to define the var... (by Elidor)
by bibtnj
Class atributes - memory class
 
Hello all! We had test in our class about some things in C++. As I'm beginner, I can't surely answer one question and after time spend on googling it, I'm st...
[1 reply] : http://www.tutorialspoint.com/cplusplus/cpp_storage_classes.htm and ht... (by keskiverto)
smart pointer , dynamically allocated memory, copy constructor and assignment operator
 
Hello forum, I believe that it is a customary that you should write your own copy constructor and assignment operator to provide deep copy of the memory when...
[4 replies] Last: oh yeah, true, I'm sorry, in my example there is no deep copy. I can... (by Gamer2015)
by nruiz8
Keep getting -fpermissive errors on my program
 
Basically, the output of my program is supposed to be like this: The class scores are: Students # Test#1 Test#2 Test#3 1 ...
[5 replies] Last: Okay then you only need one loop to loop through the columns. The rows... (by jlb)
Search Function - File Handling
 
So I'm trying to add a search function to this. It isn't running, can anyone give me some pointers? Some bugs I get (initially speaking are): Line 210: Initi...
[2 replies] Last: It keeps looping the "found" thing... //main.cpp "Music Storage Pro... (by Niscuit)
by pravi
Structure in C
 
Why am I not getting the right display in C? <#include<stdio.h> #include<conio.h> struct boat { int age; char name ; }passengerinfo ; void main() { clr...
[2 replies] Last: Thanks for your reply. What a shame on me. I changed only the %s to %d... (by pravi)
Delete string in char*
 
Hi guys, I am having some problems. I have this char* : "this is bob. ", what I need is deleting everything after the first "[". So it will be: "this is bob.". ...
[2 replies] Last: Thanks :D (by BlackPanda00)
Switch case looping
 
Ok so I have a menu program here which works fine. I'm trying to account for error input by the user. I'm unsure how I let the user enter an input again if they...
[3 replies] Last: The pattern that I use is like this: while (true) { prompt for in... (by dhayden)
Confusion About Char Array Pointer Assignment
 
Hello everyone! I understand the premise of pointers, but I'm confused about the following code: #include <iostream> using namespace std; const int MAXCHA...
[2 replies] Last: I see! Thank you liuyang. Now that I think about it, the only time the... (by BubbaD123)
Pauseing Screen
 
How could I get a program to wait for three seconds and if in that time the user puts in an input then the program ends but if they do not the program starts ov...
[3 replies] Last: Oops I forgot to mention that I am using wxwidgets and I need to see i... (by cutiepi314)
by Diedes
Looping srand(time(NULL));
 
Hey, I noticed that when you loop a random number without a pause, it will output the same number like 20 times after eachother before changing the number. Exam...
[5 replies] Last: Wauw, that looks awesome ;P So with that code the only limit is the sp... (by Diedes)
by omurad
2D array initializing error
 
Why am I getting an error when I run this? Error: "sorry, unimplemented: cannot initialize multi-dimensional array with initializer" #include <iostream...
[1 reply] : http://stackoverflow.com/questions/15520880/initializing-entire-2d-arr... (by mutexe)
Menu Fuction Not Calling
 
I'm trying to write a calculator app with functions and get back into the swing of things. but this simple bit of code just skips over hello world. Anyone any i...
[4 replies] Last: Ahhh makes sense! (by GreatUnknown)
by Yulia
Function main ()
 
I was reading and it came to my attention that was told that each program should contain function called specifically "main". Is it really needed that it should...
[4 replies] Last: You can't call main() anything you want. The linker provides a way ... (by AbstractionAnon)
polymorphism
 
why compiler keeps telling me "no addFunction member in Acccount class" class Account { public: virtual std::string getUsername() = 0; }; class Regi...
[3 replies] Last: I'm not entirely sure what you're trying to do with this program but i... (by shadowmouse)
Why is string with less characters greater than one with more?
 
I'm simply trying to figure out why a string with less characters is considered to be greater than one with more characters. My assumption would be that s3 wo...
[3 replies] Last: Ah, so it goes by the ascii table values. Thanks guys. (by The Fearless Hyena)
Can you delete a pointer from a vector with a given pointer?
 
I need to remove an object pointer from a vector with only the target object pointer. Example: std::vector<GameObject*> objects; void Game::DestoryObject(Ga...
[11 replies] Last: As long as one is not under the delusion that std::experimental::opti... (by JLBorges)
Array of pointers
 
Could someone explain what does line 7 mean.Why it gives error when braces is not used.Also why & sign is used with a2rr?And some thing about line 8. #inc...
[1 reply] : line 7 is creating a pointer to the a2rr. the *(*ptr) shall be read a... (by liuyang)
File handing code. Please assist.
 
So for some reason, my getline for entering the albumTitle in the deleteAlbum function is giving me this "no matching function call". Can someone please help me...
[11 replies] Last: I'm so sorry, it didn't do anything but give the compiler a bunch of ... (by jlb)
How to..?
 
Hello guys, I have this code which generates and prints out numbers from 0 to 2. The problem is, that for some reason there is no "00" combination... The other ...
[1 reply] : @nick9449 Try moving srand((unsigned)time(NULL)); to before the fo... (by whitenite1)
June 2015 Pages: 1... 2122232425... 32
  Archived months: [may2015] [jul2015]

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