Beginners - May 2013 (Page 54)

by SP1D3R
about Namespace and global variables
 
`Use variables in a named namespace instead of using external global variables. `Use variables in an unnamed namespace instead of using static global variables...
[10 replies] Last: Try the code cc.cpp #include <iostream> namespace hello { extern... (by vlad from moscow)
by Dineo
Please help with do..while Urgently
 
Can someone please tell me what I'm doing wrong , cause this loop will not terminate, even if I enter the sentinal character. I really can't figure out why I'm ...
[5 replies] Last: Oooh Thank you its works :D. Jidder is right. And the the upper case l... (by Dineo)
help in visual c++ 6.0
 
hey please help me resolve these errors..in file handling in visual c++.. #define TXTPATH "D:\\backup\\newdate.txt" CFile file; CFileException fileEx; boo...
[4 replies] Last: These messages 2.'|' : illegal, left operand has type 'unsigned int (... (by vlad from moscow)
by iAli98
Expected primary expression before '}' error
 
I get the error message on line 14 void money_usadollars() { int amount; double total; system("cls"); ...
[4 replies] Last: Don't worry I just fixed the problem, thank you for your replies. :) (by iAli98)
Return by reference behave as rvalue or lvalue
 
I'm working on an assignment that involves return by reference the goal is to have a member function return by reference and have it behave as an rvalue or lval...
[7 replies] Last: Thanks for that link, very helpful. Sounds like I'm going to need wor... (by Chris Meyer)
recursion question
 
I really need help with this and a sarcastic comment is not what I consider help, so if you can please give me a hand with this. Any help is appreciated, thanks...
[6 replies] Last: For any given number, you can find the first prime number by which it ... (by cire)
int variable modified by output of another int variable?
 
Hello I'm trying write a program that will modify an int variable by subtracting the output of another variable. The problem is I don't know how to make the va...
[2 replies] Last: Thanks for the response MiiNiPaa, As per your suggestion I created a ... (by Daniel326)
Please help with classes
 
Apparently I've forgotten how to use classes. I am trying to input 5 different book names into a class along with each of the book's pages. I can't figure out h...
[3 replies] Last: Post exact error here. Also you didn't set pg anywhere. (by MiiNiPaa)
Program won't compile (1,2)
 
/* File: Lab5.cpp Author: Saif Ismail Description: This program sorts occupations by salary and calculates average and median salaries. */ #include ...
[21 replies] Last: @saifismail03: Would you kindly explain what are "char array" and "std... (by keskiverto)
by gmby99
Creating a class
 
Trying to create a class, im new to programming and have been watching some videos on youtube but still not quite sure how to go about this. Some guidance t...
[1 reply] : When they refer to attributes, would this go in the .H file along wi... (by gmby99)
Retaining struct data from a function
 
If I have a struct with an array in it included in my main and I use a function to read data into that array how do I retain that data after I leave the functio...
[1 reply] : Arrays are passed as pointers, so you will be modifying original array... (by MiiNiPaa)
class code is not running
 
My code wont debug and i asked my professor and she couldnt find the problem homework question: design a class that holds the following personal data: name, ...
[7 replies] Last: Ive made the changes but still it works but then skips the rest of the... (by keyko18)
Strange crash, good ol scanf
 
Write your question here. So I am writing a program to help improve my C/C++ skills. It is loosely based on D&D rules and I am working on the fighting system. ...
[2 replies] Last: Thank you very much it works very well, now to expand! (by Compchefchad)
error: missing ';' before 'using'
 
I am using Visual Studio 2010 and I keep getting this error. booktype.cpp(6): error C2143: syntax error : missing ';' before 'using' booktype.cpp is the m...
[2 replies] Last: Here is my bookType.h file. #ifndef bookType_H #define bookType_H ... (by BrianDehn)
Problem with object going out of scope.
 
I am writing a program for a school that uses derived classes of an abstract class named bankAccount. I am running into a problem with the design of my progr...
[2 replies] Last: Thanks so much Yanson!! This did it! ptrCD = new certificateOfDeposit... (by IdivideBy0)
pointer vs value, malloc vs new
 
I am trying to construct a template of an array class to implement a dynamic array of objects of arbitrary type: Type. The basic class declaration appears be...
[3 replies] Last: Why is invoking a copy assignment operator disastrous? Because there... (by Cubbi)
control variables not being checked
 
Having an issue whit a loop not checking its control. In debugging it sees the number but seems to not check it. void mission1Story::fight() { ...
[no replies]
Errors in code I don't understand
 
Write your question here. #include<iostream> using namespace std; // function definition double MPG (double miles, double gallons) { doub...
[2 replies] Last: Corrected as follows: #include<iostream> using namespace std; // fun... (by luckyelee)
Stuffing info into a 2D array
 
Hello, I am writing a music library program (like I-Tunes) in which I have to input a exe file with commas into a 2D array. After getting rid of the commas, ...
[6 replies] Last: Thanks I will try to work on it. I will comment again if needed. (by RadCod3Win)
Help with Friends and Overloading operators
 
NOTE: My understanding of Programming is very low, the class design at my school is very flawed. Please excuse my lack of knowledge. In my programming class, I...
[18 replies] Last: lol I was thinking the same. The assignment says at the beginning to m... (by supersteez)
May 2013 Pages: 1... 5253545556... 66
  Archived months: [apr2013] [jun2013]

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