General C++ Programming - August 2012 (Page 26)

by MrKieG
having a little trouble with vector
 
void Square::updateSquare(Vertex position, float size) { this->accessVertices().push_back( Vertex( position._x - size/2, position._y - size/2, ...
[2 replies] Last: Yes it does! Much appreciado my good friend, fixed ^_^ (by MrKieG)
Does this create a race condition?
 
I have a piece of code that executes over several threads in OpenMP. Basically I have to optimise a number of "species" that are stored in a vector called vecto...
[4 replies] Last: The number of operations required to achieve convergence varies by sev... (by ausairman)
Execution error
 
Hi, I'm getting the following error when running a c++ code: terminate called after throwing an instance of 'std::length_error' what(): basic_string::_S...
[12 replies] Last: I said that because though that you were working with really low memor... (by ne555)
Need Help from a good C++ Programmer ASAP
 
Hi guys I have a program to do with Ray Casting and i am having difficultly implementing the void view::RayCast() Function, I have looked all over the internet ...
[1 reply] : Well first, why not implement a vector/point class of some sort, so in... (by closed account o1vk4iN6)
by MrKieG
Is this possible anyway
 
Say if i have a class or function that has an array parameter that can be passed in. Is there anyway to pass it in without having a premade variable. eg clas...
[6 replies] Last: You mean...like a vector? #include <vector> #include <iostream> i... (by wizulis)
Get inherited class (1,2)
 
Hi, I want to get a copy of an inherited class. How is this done ? Below an example, which doesn't compile, because of the bold-lines. // derived classe...
[24 replies] Last: 4. Conclusion There is no simple answer to the "exceptions or error ... (by Zephilinox)
Conversion of char to int?
 
I want to convert a char '1' and convert to and int 1. Is there any way to do this?(I already know that char can be converted to integers, but I don't want some...
[2 replies] Last: Just subtract ASCII '0' from it. int rslt; char a = '1'; rslt = a ... (by AbstractionAnon)
Issue with Visual Studio 2010
 
I recently bought a new computer. I downloaded visual studio express 2010 onto it and since then I have not been able to build a project. It is not an issue wit...
[6 replies] Last: Ok it must be an issue with the antivirus. When I disabled it, the pro... (by tyler22)
argv[0]
 
i am programming something in c, which will do char *string = "me.exe"; if(argv == string) { ... } else ... but the program doesn't seem to ...
[3 replies] Last: Just in case clarification is needed, strcmp returns an int. It'll ret... (by Cheraphy)
by GulHK
Interview Questions
 
Hello All Below are the few questions that were asked in an interview. Can anyone please explain to me the answers in an easiest way with examples. 1) Volati...
[12 replies] Last: Thanks Cubbi Cents cMark(5); // calls Cents constructor Cents cNancy... (by GulHK)
problem using log in c++
 
I've been trying to output ln(10) but I get an error. Here is my c++ list: #include <cmath> #include <iostream> using namespace std; int main() { do...
[3 replies] Last: This code should work in C++11 because a version of log accepting inte... (by Peter87)
Studio.h FILE wont open .raw file
 
Using OpenGl and windows to create a little fog example in my compiler but im running into issues with opening a raw file to create terrain. heres the potion of...
[7 replies] Last: I highly recommend using GetModuleFileName() and PathRemoveFileSpec() ... (by modoran)
Subclass Data Visibility
 
Is a default visibility member of a subclass visible to methods of another subclass derived from the same base type? What about protected? e.g. class B...
[1 reply] : Hi CodingInBlue, Private means that variable can be used by the funct... (by TheIdeasMan)
NESTED IF LOOPS IN INHERITANCE
 
I have been trying to use else if loop in a multiple inheritance program,but when i use it in the derived class,the if else loop is not being executed,how can i...
[5 replies] Last: i meant else if loops And again... (by viliml)
by yoreei
Recommend me a GUI toolkit that is fast
 
Hi! I recently started learning FLTK because I heard programs made with it were fast and light (as the name says). But I am wondering if there is an even faster...
[4 replies] Last: JUCE framework and Qt are best... (by HiteshVaghani1)
by beakie
Pointer array deallocation issue - delete[]
 
I wrote this class which is supposed to help handle memory allocation/deallocation. It errors in the deallocation routine. template <class T> struct i...
[5 replies] Last: Thanks. That fixed it. Nice one! (by beakie)
How is int_fast32_t faster than other ints
 
I have already used stdint header, but I am trying to understand how int_fast32_t can be "faster" than other ints ? What is different about it?
[19 replies] Last: Thanks majidkamali1370 for your reply. I can see now, that is the pur... (by TheIdeasMan)
Becoma an employed c++ programmer?
 
This will be quite personal but I need to ask some professional employed programmers of what they think. Here is my long question: I have a problem with my eye...
[8 replies] Last: 2 monitors is the minimum nowadays :) (by beakie)
by kabuki
What is it like in the field?
 
First off, I'm new to C++. So I want to know what is it like to be in the actual field? Is it writing codes all day long? I also heard that companies are more w...
[9 replies] Last: I don't think it's better . Being able to design something is pretty ... (by hanst99)
[Help] Movie Ratings - 2d Arrays
 
I have completed all my source code, aside from being able to go through my 2d array and find the highest rating by a viewer and display the column number. ...
[5 replies] Last: Great! However I should say in your case you don't need the switch (ju... (by KRAkatau)
August 2012 Pages: 1... 2425262728... 31
  Archived months: [jul2012] [sep2012]

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