General C++ Programming - October 2012 (Page 3)

3 little problem with class
 
1. int * p; p = 0; // is this right? if(p == 0) .... //in this case, the 0 means the address or the null? I am little confused 2.overloading << confusing:...
[4 replies] Last: The problem is that std::cout is a class derived from std::ostream ... (by doug4)
Alphabet Permutation (All possible combinations)
 
So I have been coding a small program in C++ that prints all possible combinations of up to 3 characters (all capital letters A-Z) but it seems that all my code...
[2 replies] Last: thanks, figured as much. good to get some confirmation on that (by contraversy)
help me understand dec to bin work
 
like this: unsigned int uiNum = 38; for(int i = 31; i >= 0; --i) { cout << (((uiNum >> i) % 2) ? '1' : '0'); } I know that unsigned int have 32...
[2 replies] Last: The opeartor % returns the remainder of division. For example 3 % 2 =... (by vlad from moscow)
Stack vs Heap
 
Hey everybody I was wondering when to use heap based allocations vs stack based ones. Even though ive been programing for about a year or two ive still never u...
[5 replies] Last: Ok, i see. Thank you guys (by Angeljruiz)
MySQL c++
 
Solved
[1 reply] : http://www.cplusplus.com/forum/windows/83463/#msg447856 (by kbw)
Importing and Exporting from Excel in C++
 
I'm writing a program to sort a Binary Design Structure Matrix. Ideally, I'd like to use Excel as a user interface for both the input of the data and the output...
[no replies]
if -else statement
 
i dont understand th if else statement with it block statement please help me .. :))
[2 replies] Last: What Moschops said. Think of it like this, if 'a' is the same as 'b'... (by Callum5042)
Having trouble finding my errors.
 
I am trying to get this programming running to turn in for an assignment however I am banging my head against the wall at this point trying to figure out why I ...
[11 replies] Last: @Edmundce (1) Don't do pointless posts like this - you could get repo... (by TheIdeasMan)
Compiler does not recognise Include Path?
 
CPP Include Path not seen by compiler?? I'm trying to build a CPP library and have set the CPP Include path as below. I Am using Windows XP with MinGW compiler...
[no replies]
Segmentation Fault (core dumped)
 
Code snippet written in C: int main(int argc, string argv ) { char final_cipher_txt ; char temp, temp1; int num, i, j, n, x; int key ...
[4 replies] Last: Nice Cire. Thanks, works perfect. *bows* Aries (by ariesthechamp)
by mimihk
Can I use a union declaration in a constructor ?
 
Hello, I am trying to learn C++, I used to work with C I have a question about constructors, lets suppose that we have a file C.cpp and another file C...
[1 reply] : You mean like class foo { private: union uni { int foo; double... (by Angeljruiz)
Switch statement into an array.
 
Hello, I'm trying to store the count of each roll into an array to simplify the code. However, I'm fairly new to C++ programming and could use some help. I have...
[3 replies] Last: use this for variable declaration. SO much easier it gives an array of... (by DarthBane)
Debug buggy program
 
I am tring to figure out why this program wont run???? // Monthly Sales Analysis #include <iostream> #include <iomanip> using namespace std; // Fun...
[7 replies] Last: ok I thought I had it but I put 0 instead of -1 on my lowmonth functi... (by nenakay)
undefined reference to
 
Hey I am having some problem with my code I just cant figure it out. I keep getting undefined reference to `Object::LoadTexture(char const*)' and i cant seem ...
[1 reply] : First format your code by highlighting it and clicking the <> button. ... (by Gulshan Singh)
Help me with my assignment "NO TIME"
 
I tried to do my homework but there's no time because I have to send it to my professor today and there's no time at all !! -Write the definition and code fo...
[2 replies] Last: Theres plenty of time. Coding that should only take a few minutes hone... (by Angeljruiz)
How to include a menu using an array
 
from this code how to include a menu using an arrray.by adding getNames, sortNames, displayNames, findName, removeName #include <iostream> using namespac...
[no replies]
General Header-file question
 
I'm certain that this is a very basic question, but i'm hoping for a little guidance. NOTE : I'm NOT looking for the answer to any assigned problems for a co...
[4 replies] Last: yep, no class is needed (by Need4Sleep)
CAN A TEMPLATE CLASS HAVE A FREIND FUNCTION IN IT?
 
Hi everyone, Can a template class have a friend function? like this: template<class Type> class myClass { friend void foo(); public: ... ...
[4 replies] Last: You declared non-template friend function but are trying to define it ... (by ne555)
cash program guidance
 
-
[5 replies] Last: for future reference, when your topic is finished simply mark is as so... (by Need4Sleep)
error in the main
 
#pragma once #include<string> #include<iostream> using namespace std; class Student { int id; string firstName; string lastName; string cours...
[1 reply] : Please don't make us guess. If there is an error message, tell us what... (by Moschops)
October 2012 Pages: 12345... 50
  Archived months: [sep2012] [nov2012]

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