Beginners - November 2011 (Page 62)

default constructors
 
When dynamically allocating memory via new , as in new T , I understand that not only is a block of memory allocated, but each element is default initialsed ...
[3 replies] Last: Thanks, georgewashere and shacktar. I'm starting to see now why creat... (by kamisama)
File I/O question
 
I am studying file I/O and writing simple programs. This one has an issue I don't understand and any enlightenment would be greatly appreciated. Here is the ...
[4 replies] Last: I wasn't aware the declaration of a do/while loop allowed for operatio... (by jjmounes)
String Manipulation Exercise
 
Construct a console application using C++. The application should accept a single argument, a string. The application should then output an alphabetized list ...
[1 reply] : To store letters use set<char> . All letters will be sorted and dupli... (by tfityo)
non-lvalue in assignment
 
As the title suggests, this is the error I am getting "non-lvalue in assignment" on line 66. #ifndef _CREADOUT_H #define _CREADOUT_H #include <stdio.h> #i...
[6 replies] Last: Thanks I can't believe I missed that, thanks. The static members are t... (by forceface)
by jansen
Need A little help here... ^^
 
Hey I have problem here ^_^ If I have int a = 10; int b = 2; int c = (a&b) << 1 the result of c is 4 but I don't know the process what does (a&b) means?...
[1 reply] : 1_ http://cplusplus.com/doc/tutorial/operators/ bitwise operators. 2_ ... (by ne555)
set function for vector
 
Hello, can someone help me make a function that sets the data vector of the sample? void set_data(const vector<double> & v) { ... }
[no replies]
Question about const qualifier in functions.
 
Hey I have a quick question about when I'm suppose to use this const qualifier in my functions. Let's say I am trying to add two objects from a user defined cl...
[1 reply] : A member function that logically would not modify 'this' should be con... (by Disch)
by Lia
please check my pseudocode
 
based on this c++ program.i need design pseudocode.i already made the pseudocode.please check any mistake #include<iostream> using namespace std; void xR...
[1 reply] : @Lia I checked out your program, and it works great. I would change t... (by whitenite1)
Removing Line From Text Doc
 
I'm trying to remove a line in my text document so that when I run it the UI asks if you would like to remove the item thats in the external document called rem...
[no replies]
Help with this problem
 
#include <iostream> using namespace std; int main() {cout<< "Welcome to RollCast's Classic Salmon Fly Proportion Calculator!"<<endl; cout<< "Please ent...
[2 replies] Last: @Roll Cast I added a do/while and changed the floats to doubles. Work... (by whitenite1)
Help
 
Write a program that performs following tasks: 1. Declare three arrays. The sizes of these arrays are all 100. The first array is of integer type. The seco...
[1 reply] : try this: #include <iostream> #include <ifstream> using namesp... (by punjabian)
by seppel
Const makes all the difference. Why?
 
class T{int i; public: T(int i):i(i){}}; int main(){ T& a1(0); //C2440 const T& a2(0); }
[8 replies] Last: Still cant see why T& a1(0) is not working. A T& by itself is not a... (by Disch)
by EPCvet
Issues with displaying array
 
I'm trying to make the values of my array display in rows with 'm_x' length, but it isn't organizing as intended... int m_x = 5; //for testing int m_y =...
[4 replies] Last: I'm actually trying to use it to create a map of sorts... It would sta... (by EPCvet)
class and vectors
 
Hello, I just started to learn c++ so I don't know much yet, but I wanted to learn about creating classes and vectors. I'm want to make a class lets say cl...
[4 replies] Last: You lost me there, sorry I'm a complete newbie when it comes to progra... (by grieves)
by mawgly
C-string as parameter
 
I basically just want to know how to pass arrays into parameters of type char, For example my question is to implement and define a function of type char in a ...
[2 replies] Last: I need more help, are the constructors in the implementation correct, ... (by mawgly)
by RyanV
C-String Input Problem
 
Howdy fellas, I've got a project for class, and part of it involves inputting c-string information into a struct. Here is my code for inputting the infor...
[1 reply] : I have produced the following code to test your issue: #include <ios... (by JMJAtlanta)
by hikoch
date conversion (HELP)
 
i want to convert a date into a number for example, 1Jan2012 would be changed to 1, 1feb2012 would be changed to 32 i have typed some codees but wrong output ...
[1 reply] : The code has a few errors which will need to be corrected. I'm not ent... (by JMJAtlanta)
undefined reference to 'RunSwmmDll(char*, char*, char*)'
 
Hello, I have tried to 'google' this seemingly basic problem but all the suggestions I have found don't work. I have a calling program "trial_1.cpp" #incl...
[3 replies] Last: Undefined reference indicates that the compiler knows the prototype, b... (by Moschops)
error in compilation
 
I am a begginer C++ Programmer who knows a bit more about C. I want to have a concept of classes but my codeblock is giving me some problem. It works well with ...
[no replies]
Container Dump
 
The Program I am trying to create is trying to create an object, copy itself into a global vector of the class, destroy itself, while keeping the vector copy sa...
[1 reply] : Just write a normal constructor: Point::Point(double _a,double _b, d... (by closed account D80DSL3A)
November 2011 Pages: 1... 606162636465
  Archived months: [oct2011] [dec2011]

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