General C++ Programming - April 2013 (Page 15)

Type casting
 
why do we generally do typecasting ....my question is if i write a code below inta=6; int ptr=&a; int b= reinterpret_cast<int>(ptr); and print b then it...
[3 replies] Last: Rounding: std::round() and friends http://en.cppreference.com/w/cpp/... (by JLBorges)
Structure template c++
 
What is the difference between template<typename T> struct arg_type { typedef T* ptr; typedef T& ref; static T& myFun(T& a) {return a;} } template<typename ...
[5 replies] Last: @Vlad Rhank you for the keyword @JLBorges Thank you very much for pro... (by knightrider007)
Storing Integer Arrays safely
 
Ok so I have two problems and I am wondering if anybody here can help me on this. I have an assignment where I have to design, implement, and test a class for s...
[2 replies] Last: a. Your class must store an array of integers (max 100). You need to k... (by JLBorges)
Should this array be created in Heap or Stack ?
 
Dear gurus, This is about returning an array from a function. First, in the function, an array is created by allocating space from the heap (line 14 and 18 b...
[7 replies] Last: Oh I see, sorry for misinterpretation. Thank you very much. (by activecat)
by Elidor
ofstream in a class file
 
Ok, so this is part of a larger project but here is a test file that I haven't been able to get running. I don't understand why the minute I put an ofstream obj...
[3 replies] Last: Perhaps, have the exception keep information about the path of the fil... (by JLBorges)
question. <string> or <string.h>
 
is there a difference between the two?
[4 replies] Last: Both are header files. Files that you have access to. It is possible... (by keskiverto)
File into three arrays help
 
Hi every one ,Please I need some help with this. A guide and a short code to built on . I wants to computerize inventory records. So am requested to wr...
[no replies]
Templating Question(The last one i swear)
 
I include my implementation at the end of the header so its included before the compiler is done with the .h file. but i have one error reffering to the .cpp fi...
[2 replies] Last: That sentence didnt make as much sense out loud. I need to have a sep... (by billycro)
Structured arrays
 
I working on an assignment that processes an array of structs. In the main function I am attempting to declare an array of Author structures with 3 elements. It...
[4 replies] Last: That works perfect. Thanks (by Millhouse17)
std::string to std::wstring with extended characters (unicode)
 
Hi, I have an app that is required to run with some extended characters, such as the characters defined in Latin-1 Supplement and, possibly, Latin Extended-A, a...
[4 replies] Last: Thanks For Use. (by YerLopez)
linkedlist copy construcotr & overload assignment operator
 
I'm writing my node and list classes and everything works fine except when I include destructor , copy constructor and the assignment operator functions in the ...
[no replies]
Working with functions & fractions
 
I'm having a bit of trouble with a assignment.. I have to use functions to declare any type of problem done to a fraction using functions. I need a little help ...
[no replies]
The *this pointer returning a reference
 
I think the following member functions operator++ and operator-- code return a reference of type Digit. I think the *this pointer returns the member functions...
[2 replies] Last: Use code tags. (by Anmol444)
sum of stack
 
plz check why does it not provide the require output #include<iostream> using namespace std; struct Stack { int item ,top; }; void push(Stack *a,int no)...
[1 reply] : Use code tags. The <> under format (by Anmol444)
a problem with the memory leaking
 
The following code shows the binary search tree: #include <iostream> #include <windows.h> using namespace std; struct node { int key; struct node*left...
[8 replies] Last: this one looks better: struct node { int key; node* left; nod... (by DANNY123)
Why overload the function call operator ( )?
 
Why? I am very confused, can someone please help?
[17 replies] Last: Ok thanks (by Anmol444)
by areej
draw
 
, write down the statements that declare a pointer variable with identifier to a TShape with identifier “MyShape” and use it to create a TShape object at ru...
[no replies]
Pointer array confusion
 
I am royally confused with how this code processes. I know the output is 2 since I compiled it, but I am uncertain of how the code works. Sorry, I'm new to C++ ...
[2 replies] Last: Yes! thanks a lot. (by Millhouse17)
by areej
draw that pic
 
[url=http://www.gulfup.com/?ZVNTHn] http://im35.gulfup.com/1Ak5C.png [url=http://www.gulfup.com/?wPgIkR] http://im35.gulfup.com/Yk2kP.png Enter a n...
[no replies]
string parsing
 
Hi I need a help in reading a specific input syntax. something like <Input> :: R C <Content> 3 3 .3. .15 9.2 .1. ..6 ... 6.5 7.. ... ... .5. ....
[2 replies] Last: if you can write a regex to match the string, you can use std::regex d... (by hansaaa)
April 2013 Pages: 1... 1314151617... 53
  Archived months: [mar2013] [may2013]

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