Beginners - January 2015 (Page 21)

Output from File I\O
 
I have followed all of the steps and completed my work, but I don't know how to get the sample output for this. My code successfully takes the file from the use...
[2 replies] Last: To get the exact output style you described I had to restructure the c... (by tipaye)
Why wont this work
 
If I have this in a regular main.cpp file without adding the separate class file I can get the program to run but I cant get it to work when they are in separat...
[6 replies] Last: No. Headers are included, sources compiled. When you compile "main.cp... (by keskiverto)
operator overloading
 
Here employee_count is a class, In this context, could somebody explain the meaning of & in following statement(operator overloading) employee_count & o...
[4 replies] Last: yes, employee_count c = d; is equivalent to employee_count c(d); w... (by ShodanHo)
What does this code do?
 
hello, Can someone please explain what the 2 lines of code do? int first = *(int*)first_arg; int second = *(int*)second_arg; this is the...
[3 replies] Last: thx ;) (by skorefish)
What does "\t" do?
 
This is a general question. I have searched the Internet for an answer but could not find anything. I know what "\n" is and how to use it. Now I have com...
[3 replies] Last: @James1st I feel you. Years ago I was trying to understand msdos make.... (by tipaye)
passing std::multimap<int,int> as a function parameter
 
i am passing an std::multimap<int, int> (a global variable) as a parameter to a function. In the function itself (function first_rumble() ) the map behaves wel...
[2 replies] Last: damn the fuck...you are right!!! my goodness... just an ampersand and ... (by donvigor)
flowchart
 
hi! so i have to complete this c++ assignment for my schools's project but my teacher hasnt gone through the use of functions. so, i am i bit stuck and unsure o...
[2 replies] Last: oh i didnt know that!thanks for telling me!:) then, do you know how i ... (by kimpossiblezz123)
How I learn C++ to make a simple sidescroller?
 
I know a bit of Javascript, know nothing of C++. But the thing is, I have C++ Primer 5th edition, but I can never start it. Keep it mine I am only 13 and want t...
[1 reply] : C++ Primer is a bit advanced book for beginners. If you want to learn ... (by Anthony5347)
C++ Undefined error please help me.
 
I'm pretty sure my entire code is fine! This is a very basic code because i am just starting to learn C++ and am making a very basic calculator. Please review t...
[5 replies] Last: Yes stupid phone auto correct XD. I edited. Thanks Again eveyone! (by Davidvoodoo)
Class Templates
 
Ok so I understand how function templates work. I am having issues trying to make a class template. I have three separate files, all in the same project, I am u...
[7 replies] Last: Some object might have explicit constuctor taking int, so implicit con... (by MiiNiPaa)
by SkyZ
Change character in a Initiliazed array?
 
Hey everyone, my problem with this code is that i have a char array . The program sells tickets and u may purchase a seat based on if its avaliable or not. '#'...
[6 replies] Last: This is a practice project. I can just do whatever since its so vague.... (by SkyZ)
by beko
Random Numbers
 
I'm doing an exercise (Accelerated C++), in which I want a function to generate random students. It does manage to create a random student, however, it does cre...
[6 replies] Last: Ah, thank you! Also, I did overlook something. The reason I thought I... (by beko)
Dynamic arrays of class objects
 
I posted this yesterday but I only got one response, I still haven't managed to fix the problem. I can't fix this code, the program will not generate random...
[2 replies] Last: Ok, thank you. The person who responded to me yesterday mentioned the ... (by Juan3273)
by teerna
Question on structures, arrays and functions
 
Hi, I have to write a C++ program by passing structs to three functions Input_stud (to enter data about students eg name, id and testscores), Calculate_over...
[3 replies] Last: Thanks a lot, Manga and Anthony! I have understood that I have to pas... (by teerna)
Header files
 
Hello, Getting error when trying to compile these files: my.h: extern int foo; void print_foo(); void print(int); my.cpp: #include "my.h" #include ...
[19 replies] Last: Now I understand... Thanks! (by pacman169)
by Jt253
Problems with Visual Studio professional 2012
 
Hi guys I'm not really sure if this is the right place to put this question but I am in need of desperate help. I need to download Microsoft Visual Studio fo...
[4 replies] Last: I'm pretty sure I tried that before. I'm really starting to get fustra... (by Jt253)
Override or remove an inherited constructor
 
Is there way to override or remove an inherited constructor in derived class? // constructors and derived classes #include <iostream> using namespace std; ...
[1 reply] : I am not sure what are you trying to say: you do not inherit any const... (by MiiNiPaa)
File Handling ios_base::trunc
 
A user will input entries. But when the user wants to clear out all the info, it displays no entry but can be updated if inputted again. I don't know how to upd...
[1 reply] : Open the file in binary mode. To read or write the Nth record, seek t... (by dhayden)
Somthing wrong with the pointers???
 
Hey, the first part is working code QFile file("c:/test/test.txt"); QFile *pFile=&file; if(!pFile->open(QIODevice::WriteOnly)){ q...
[2 replies] Last: ok, yes of course... the pointer survives but not the object... thanx... (by skorefish)
Need Quick Help
 
hi guys could any one please solve this problem for me because it is urgent find and display the sum of all the values, which are ending with 2 (i.e., unit...
[3 replies] Last: Thank you that solved my problem (by rtolambiya)
January 2015 Pages: 1... 1920212223... 39
  Archived months: [dec2014] [feb2015]

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