General C++ Programming - September 2010 (Page 5)

Trivial issue
 
In the following code for some reason, the variable iTileCount will not re-initialize itself through the 2nd and 3rd iterations of the nested for loops. I stepp...
[1 reply] : If you don;t need it outside the for loop you can define it inside the... (by LB)
Full Screen?
 
I am wondering how to make a window go full screen?
[3 replies] Last: You've got to turn off your window borders, set the topmost property t... (by Duthomhas)
How to get execve() to like your environment vars?
 
Hi everyone, I'm a moderately experienced C coder trying to figure out the execve() command. Here's the basic problem: My program takes a comm...
[1 reply] : You need to use the execvp () function to have it search the PATH for... (by Duthomhas)
If Statement?
 
I have been trying different things, but I cant get this if statement to work. Declarations #include <iostream> using namespace std; char name =...
[6 replies] Last: Nevermind, R0mai's code solved the problem. (by phr33zr)
by samnet
Math Exception Problem
 
#include <iostream> #include <exception> using namespace std; main(){ try{ int x = 1; int y = 0; int z = x / y; } catch(exception& e){ ...
[1 reply] : Second result for google search "c++ divide by zero". http://www.jdl.... (by R0mai)
Tic Tac Toe program solved
 
I have here the code for a working tic, tac, toe C++ program: #include <iostream> int main() { char cSquare1('1'); char cSquare2('2'); char cSquare3(...
[3 replies] Last: watch some pages back (like 2-4 i cant remember well), a guy asked how... (by jumper007)
referance objects cause "no match for" kinds error
 
hello, while I was using msvc I could use a referance and actual object interchangably however when I switch to g++ 4x, I start getting no match for ... kind of...
[1 reply] : hmmmm... try to compile with another program ... i dont see anything ... (by jumper007)
Using a map to keep a total?
 
I am trying to figure out a way to use maps to keep a total number of items. I was using arrays before total = total + (function to add another int); ...
[3 replies] Last: I think you want more of a vector than a map. http://www.CPlusPlus.co... (by LB)
Whats This onE?
 
typedef vector<Widget, SpecialAllocator<Widget> > WidgetContainer; I came across this syntax on Vector recently on a book about STL containers and I was surp...
[1 reply] : http://www.CPlusPlus.com/vector As you can see, the template takes ... (by LB)
Passing Stacks/Maps through a function?
 
Is there any way you can pass a map and/or stack through a function. I'm writing a program for a card game using stacks/maps and I am really stuck trying to ...
[1 reply] : void myfunction(const std::stack<int>& foo) { // use 'foo' here... (by Disch)
error: assignment of data-member ... in read-only structure
 
const double * OsiCsdpSolverInterface::getObjCoefficients() const { if (objCoeff != NULL) delete objCoeff; objCoeff = new double ; return...
[3 replies] Last: I'm not sure removing const is the right way to go here..... So ... (by Disch)
by amrok
Unresolved External
 
Hello! I've got some strange problem: there is a function in cpp file GLMmodel* glmReadOBJ(char* filename) { ... } and it's defined in header as ...
[2 replies] Last: Got the problem solved: the function implementation was in .c file, no... (by amrok)
Split String
 
Hello C++ peoples, I am brand new at C++. Three months and I think I really like it. I am not an member of any C++ forum until now. I search google for an...
[11 replies] Last: You can try extrapolating from this: std::string name("First Last");... (by Zhuge)
by fatal
public, protected and private derivation
 
Which members of parent class is accessible to the object of derived class in these cases: 1. class child : public parent 2. class child : protected parent 3. c...
[2 replies] Last: Thanks ;) (by fatal)
array search
 
i have an assignment that should read from a file something like: brian mckelly //name of artis(string) cplus plus site //titl (string one or ...
[3 replies] Last: You don't have to use arrays if you don't want to. From what you're te... (by LB)
Links
 
I am wondering how to feed a website link into a program? For instance a live radar?
[no replies]
by raz23
Factorial issue
 
I'm not going to post the whole code since it's pretty long but I'll give a few snips of the important stuff. #include <iostream> #include <iomanip> #inclu...
[7 replies] Last: Hey everyone, I talked to my teacher today and she said it would... (by raz23)
Class and object
 
I just learned class and object today, couldn't even get the code compiled. could anyone help please? Thank you I have three files: Product.h Product.cpp ...
[13 replies] Last: I added the safeguards in the file. Thanks kfmfe04 I know all the ... (by yingkang)
Problem with Unicode
 
Anybody help me please ! How can i use unicode string in C++. I use Eclipse IDE for C/C++, MinGW to build project. Thanks.
[8 replies] Last: Just works in Codeblocks, not work in Eclipse for C/C++ ! Even thought... (by micheal9000)
what is the differnece between the two coding styles
 
Hi all: i just saw this,assuming var is a variable. if(-1 != var){ ; } another common coding style is if(var != -1){ ; } ...
[4 replies] Last: has this nothing to do with efficiency ? No, not at all.... (by Athar)
September 2010 Pages: 1... 34567... 20
  Archived months: [aug2010] [oct2010]

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