General C++ Programming - January 2013 (Page 21)

inline-ness of private nested class
 
it seems that I cannot define a method of an inner nested class if it is a private class. for example: class outter { class nested { void fo...
[5 replies] Last: vlad: I figured it was a typo. =P (by Disch)
File extension
 
this is an extremely weird question, but is it possible to define and write your own file extension. if so is it an easy process or a complex waste of time a...
[3 replies] Last: I know it was just a text file but I didn't know it was that simple ... (by James Parsons)
Need help with making a basic trivia game in c++, just a beginner and still learning.
 
Programming Help - Its basic for regular c++ coders but i having a little trouble im making a trivia game as practice but im having trouble, i want it to ha...
[7 replies] Last: cin might actually return a string you could try using getchar instead... (by James Parsons)
Indenting Program
 
I'm trying to make a program that indents a code correctly based on detecting {Braces}. The trouble I'm running into is recognizing if there is already a tab in...
[4 replies] Last: Generally, having to phrase your troubles as words in the form of an i... (by LB)
need some advise/help
 
I would really appreciate it if someone could help me with a problem i am facing, because seriously its driving me crazy. My problem is as follows (withdraw p...
[4 replies] Last: OMG, it works , i love you man, thank you so much, i owe you one :P R... (by closed account jyTM4iN6)
Reading an unknown number of inputs and adding them in a Vector
 
Consider the following piece of Code: int ReadNumbers() { int num; vector<int> x; cout << "Enter Numbers" << '\n'; while(cin >> num) ...
[10 replies] Last: Ok Thanks! :) By the way, can anyone suggest an introductory book for ... (by ChosenTorture)
by ljs
operator overloading
 
Hi hi, is it possible to use operator overloading to overload an " " operator instead of just " " ? What I would like is that upon reading myContai...
[2 replies] Last: Is it " " really a different operator than " "? Intuitively I guess i... (by Marcos Modenesi)
by jaded7
compiler optimizations
 
Is there a way to enforce a compiler (g++ 4.7) to not perform any optimizations within a certain block of code?
[3 replies] Last: Maybe: #pragma GCC optimize ("O0") (by Caligulaminus)
Optimizing 82C54 emulated timertick?
 
I've written a script in c/c++ for emulating a timer tick of a 82C54 chip (PIC). However, even after optimizing it it still runs slow (currently being called at...
[1 reply] : Part 2/2 void status_running(byte channel) //Running? { byte tocoun... (by superfury)
Calculate mean of Array class
 
Hello, I am trying to create a small function that can return the mean of an object of array class, not a simple array. Declare and initiate the array: ...
[8 replies] Last: That function is in a .cpp file (not the main cpp). Shall I put it in ... (by dekeenfrance)
FMOD
 
void CMainDlg::OnReleasedcaptureSlider2(NMHDR* pNMHDR, LRESULT* pResult) { unsigned int lenms, currtime; musicChannel->getPosition(&currtime,FMOD_TIMEU...
[no replies]
by yhu420
error: expected unqualified-id before 'bool'
 
Hi there! There is nothing special here, its just a code that doesn't work^^ Sorry this is a french version of the program :/ The error is at the 19th line o...
[2 replies] Last: Thanks, ill check out asap! Ill let you lnow if something else went wr... (by yhu420)
two loops to single loop
 
EDITED i have two loops ie. if (n==null) { do loop 1 } else //(n=!null) { do loop2 } now i have to update the above code, with a single ...
[4 replies] Last: i think you can just... do loop 1 do loop 2 no check necessary (by dreamincolor)
by ooki
in what type intermediate result of an expression is stored
 
i am having a doubt and i would appreciate the help. my doubt is :- in what data type the intermediate result of an expression is stored? like for expression 2+...
[4 replies] Last: Thanks for all the help. (by ooki)
Visual c++
 
Thid code compiles fine in the dev but gives error in the visual c++ at line Number 87 and 90 #include <windows.h> LRESULT CALLBACK WndProc(HWND, UINT,...
[1 reply] : What's the error? Maybe try casting the strings to LPCWSTRs. Messa... (by MrHutch)
Finding a string within an array
 
Hey guys i just want to check to see if one word (string) or one sentance is equal to any others within an array. My code ...
[18 replies] Last: Ok, i wrote that one in hurry. This one is even tested, and works. ... (by closed account 9y8C5Di1)
Pure virtual function
 
I want an example of the destructive function as a pure virtual function Please help me
[2 replies] Last: Pure virtual destructors are useful when: 1. you need an abstract base... (by Cubbi)
"error C2677: binary '*'" for already overloaded operator
 
Dear person who reads this, I'm working on my own math classes for vertices and matrices for a school project and for that I have overloaded several operator...
[2 replies] Last: Thank you! That solved the compile errors :D (by Friso1990)
const string array to a int array
 
Ok so I am back in school and it has been to long since I have used c++ I can not find or figure out how to convert a char array into a int array so i can add n...
[2 replies] Last: thanks copmuterquip I think i got it, I actually just copied it into ... (by Lazysquirell)
by game
if statement with break!
 
char step; std::cout"Enter y for yes, n for n, proceed for p"<<endl; std::cin>>step; if (step=='y') { std::cout <<"YES"<<endl; } else if (step=...
[3 replies] Last: Okey thank your very much guys, It helps a lot. Great! (by game)
January 2013 Pages: 1... 1920212223... 36
  Archived months: [dec2012] [feb2013]

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