General C++ Programming - May 2013 (Page 5)

by Daleth
String literal with constexpr
 
I have a binary identifier which I tried to make a constexpr since all of its calculations would nev...
[4 replies] Last: Alright, thanks for the suggestions. On a side note, how come you don'... (by Daleth)
C++ ARRAY_SIZE() - why you still need a macro
 
Now, as I'm primarily a Visual C++ developer, I use the _countof() macro which is provided by the ...
[no replies]
Inheritance problem
 
Hi, I have an abstract base class - let's call it MyInterface - and a class that most classes in ...
[2 replies] Last: Your comment made me start thinking in a new direction, I've solved i... (by Andersson)
by naz
How many bytes will the pointer intPtr of type int move in the following statement? intPtr += 3 ;
 
How many bytes will the pointer intPtr of type int move in the following statement? intPtr += 3 ; ...
[2 replies] Last: 3*sizeof(int) bytes. So (b), (c) or (d) depending on machine. (by MiiNiPaa)
Runtime speed integer versus double
 
Dear fellow programmers, Is using integers faster than using floating points? Or more precise: wh...
[2 replies] Last: MiiNiPaa, Thanks for the reference! I posted my conclusions (and tha... (by Bilderbikkel)
C++ Files / End of Line
 
Hi, i have a question about files in c++. I need to do a program that reads a .txt file and store...
[2 replies] Last: The call to getline() is its own end-of-file condition: like most othe... (by Cubbi)
by naz
Choose the correct answer.
 
Consider the following code segment. What will the following code segment display? int main(){ ...
[1 reply] : http://www.cplusplus.com/doc/tutorial/arrays/ (by Fransje)
by naz
Identify the errors in the following code segment and give the reason of errors.
 
main(){ int x = 10 const int *ptr = &x ; *ptr = 5 ; } main() { int x = 10; const int *ptr =...
[1 reply] : http://www.thegeekstuff.com/2012/06/c-constant-pointers/ (by Fransje)
Building Bridges
 
**Problem:** There is a river that runs horizontally through an area. There are a set of cities abo...
[no replies]
Direct X is so hard
 
I have just gotten a book called programming 2d games by charles kelly(using c++) The book teaches...
[1 reply] : You must understand the DirectX interface and the API functions associ... (by Nexius)
Thank you for all the help so far. Any ideas on this?
 
This is what I have to do: In most companies the amount of vacation you receive depends on the nu...
[3 replies] Last: Hi dragonscrapper; i modifeid your code since it has alot of syntax an... (by Zaki Al Qudah)
Passing 2d array to pointer in C++
 
Kindly remove one error. #include <iostream> using namespace std; void insert_values(char **p...
[4 replies] Last: In the code above the row and col are the wrong way round on line 18. ... (by andywestken)
ifstrem bytes buffer
 
I need to read whole binary file and pass bytes buffer to third party function. Currently i am fill...
[3 replies] Last: PS: looked at the execution of ifstream::read() for a large binary fil... (by Cubbi)
by ReVolt
C++ threads
 
hi, I've downloaded tinithread++ for c++ and i can't see option to pass data to function while creat...
[4 replies] Last: thanks, it's quite new to me so i did not know :) (by ReVolt)
Function problem
 
#include <iostream> #include <iomanip> #include <cctype> #include <string> using namespace std;...
[3 replies] Last: The same way as it would return any other variable. Whatever turorial... (by MikeyBoy)
by Moloer
Question to come later
 
Write your question here. #include <conio.h> #include <stdio.h> #include <math.h> #define LI...
[1 reply] : Part (a) printf("%.3lf\n", d ); printf("%+12.2lf\n", d ); printf("%0... (by Moloer)
character array
 
write a program that ask his or her name and store it in a character array
[1 reply] : Please note, that it is not a homework site. We won't do your homework... (by MiiNiPaa)
by DanT
Partial template specialization with template class
 
Hello, I have a generic template class with another template in one of its types. Now I want to spec...
[1 reply] : Look here: http://stackoverflow.com/questions/5688355/partial-special... (by KRAkatau)
by crobar
Call to global fcn in template class static helper fcn result in linker errors, but not calls in member fcns?
 
Hello, I'm a newbie to class templates, and a moderate C++ programmer in general. I have a projec...
[4 replies] Last: xhypot is a global function declared, in an included header in real.h ... (by crobar)
problem in float function of percntage
 
hi guys,, below is the code of a program using classes and functions ,, my float function doesn't sh...
[6 replies] Last: Thank you guys.. Its been so nice of you,,, its solved now,, #include... (by junaidkhan2013)
May 2013 Pages: 1... 34567... 47
  Archived months: [apr2013] [jun2013]

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