General C++ Programming - August 2014 (Page 12)

Function pointer to non-static class member
 
Hi, I have the following problem: I am using NLOpt for optimization. The API provides functions to set the objective. This is done as follows: double obj...
[1 reply] : Use the `data' parameter to pass the object class Foo{ public: doub... (by ne555)
by Echyon
Optional/default parameters in class functions
 
In the thread "Making a argument optional to function", it is stated that to set default values for arguments of a function you can simply do so in the function...
[2 replies] Last: Ah, thanks, it looks like that solved it! (by Echyon)
for loops
 
I found this example in the link: http://www.cplusplus.com/doc/tutorial/arrays/ at the bottom of the page. #include <iostream> using namespace std; int mai...
[1 reply] : It's a new feature that was added in C++11. If you have an old compile... (by Peter87)
by lekha
Help me
 
well i have 2 new problems... 1. when i play again the percentage is increasing to 160% 180% and so on... why is tat so.. i know its something to do wit my "pe...
[4 replies] Last: thank sooooo muchh... i really appreciate your help alot... thank you.... (by lekha)
c++ call function synthex to be equivalent to echo "hi"
 
What I want to do is simple, however I can not find a way to do it in c++ and I don't know for sure that it is possible. I want to create a function that create...
[2 replies] Last: In C++ you need () or other operators (such as *,+,- etc.) to call f... (by Lachlan Easton)
mystic logic error in my double for loop
 
Hello. I want to do this: In a record I have IDs of type int but some may repeat. These IDs also got sales of type float. I wish to compare the IDs number of t...
[8 replies] Last: Thanks:) I solved it and submitted the program to my tutor as lab task... (by csstudent123)
could someone create a programm to solve HW for you that is not a calculator?
 
Could someone make a programm to complete any math homework that is not a calculator and can put the answers in a .txt file?
[1 reply] : http://www.wolframalpha.com/ (by LB)
GetAsyncKeyState(VK_) Trouble
 
How do you get it to tell you when you hit enter? This doesn't work: #include <iostream> #include <windows.h> using namespace std; int main() { if(G...
[3 replies] Last: Also note that you are only interested in bit 15 of the output: if(... (by Disch)
Timer Issues confusing...
 
This programm isn't working for my debugger/compiler and I need some assistance figuring out what the problem is... and please dont tell me not to use system, I...
[14 replies] Last: Ok u r correct, thanks for the help :) (by jasonwynn10)
by N10
an alternate key word for getch
 
i was trying to make a tic tac toe game where the user can play against the computer it s in borland c++ and not in c++ 11 so i wanted to convert it into c++...
[2 replies] Last: @ keskiverto Methinks you misread the question. OP wants to use getc... (by Duthomhas)
by Aceix
shared library creation
 
Hi all, I want to know: 1. Pros and cons of shared libraries 2. How to create them(any tutorial link or book will be good) 3. Compare static libraries to dyn...
[1 reply] : https://www.google.com/search?q=shared+library+howto (by Duthomhas)
decrement operator c++ - n queens reduce operations
 
We made us two questions while we wrote this code: http://ncomputers.org/content/code.php?src=n-queens/n-warp.cpp Are we making an incorrect use of the increm...
[4 replies] Last: Answer: Post and pre increment and decrement operators limitation due... (by ncomputersorg)
Referenced argument not updating
 
I have a simple program that outputs two strings. The program is supposed to output the second string once the user presses the enter key. Just in case the us...
[3 replies] Last: You only need to use std::ref or std::cref when passing arguments ... (by LB)
What is the best compiler?
 
Does anyone know which compiler is good for noobs, I have a noob brother... he knows nothing and im teaching him.
[5 replies] Last: thanks, I'l try them all. the one i use is code::blocks 13.12 with GNU... (by jasonwynn10)
hw too solve the equation
 
write a programme in c++ to solve the equation a^2 + b^2 = c^2
[4 replies] Last: // solved for a a = sqrt( c*c - b*b ) // solved for b b = sqrt( c*c... (by Disch)
what's the right way to learn c++
 
i'm a beginner c++ programmer . currently i'm reading c++ primer . I have been thinking that what might be the best way to learn c++ (by reading books or by pra...
[3 replies] Last: I devote about 2-3 hours a day and practise regulary . Every sunday I ... (by ayushexel)
I need a struct or something similar to it but what and how?
 
Dear C++ Experts what I want to archive is to get something like this: echo databaseTable // list of all tables from this database echo database...
[7 replies] Last: Qt has a SQL module; classes for database operations. It can use sqli... (by keskiverto)
by abc1
char datatype
 
char data type is a non-numeric data type. Then why signed and unsigned modifiers are there in char data type?
[6 replies] Last: Each character is represented by a number. When you print a char it wi... (by Peter87)
Using Quaternions
 
I have been trying to convert euler angles to quaternions and have not been able to do ether. I would like to be able to take a vector and apply a quaternion to...
[8 replies] Last: No. The rotate() is definitely wrong: Lets take (1,0,0) and turn it 9... (by keskiverto)
Constructor
 
What is the total no of arguments we can pass to parameterized constructor in c++?
[1 reply] : Why do you want to know that? (by helios)
August 2014 Pages: 1... 1011121314... 25
  Archived months: [jul2014] [sep2014]

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