General C++ Programming - September 2014 (Page 11)

Simple Loop through vectors
 
This is probably a very basic question, but I need to create two vectors and then loop through the vectors and output each pair that is found. The user will ...
[1 reply] : int step1, min1, max1 step2, min2, max2; //Initialise variables /... (by MiiNiPaa)
Storing std::functions in STL container?
 
I've a bunch of delegate factories, defined as Lambdas using different arguments, i.e.: std::function<Test*()> f1 = [&]() -> Test * {return new Test();}; ...
[6 replies] Last: Howdy, what a creazy stuff! This is going in the direction I want to h... (by hellhound)
glGenFramebuffers crashes
 
Hi again, as already told in the thread http://www.cplusplus.com/forum/general/142748/ i'm currently lerning OpenGL-Programming with dev-cpp / MinGW-Compil...
[no replies]
MinGW / OpenGL linking-problem
 
Hi there, i'm currently lerning OpenGL-Programming with dev-cpp / MinGW-Compiler. While working with a second renderpass using the result of the first pas...
[5 replies] Last: Seems that i found a solution: I did not use the "glGetString"-functi... (by artganseforth)
How to handle managed and unmanaged code in vc++
 
Hi i am need a help for handle managed and unmanaged code. In my project i am using the c# using system namespace. And also i use other lib file from crypto++. ...
[1 reply] : Use Managed C++ (Now CLI) as a bridge between C++(Un managed) and C# (... (by Rabindra Hota)
Template function parameter, passing by reference, instead of copy/pointer
 
Due to the nature of this requirement, I've made a very minimal example, which would adequately solve my issue, without resorting to use of pointers or copy con...
[3 replies] Last: Unfortunately when the copy was destroyed, the data it encapsulates a... (by MiiNiPaa)
Pass by reference to a template function through parameter only
 
Due to the nature of this requirement, I've made a very minimal example, which would adequately solve my issue, without resorting to use of pointers or copy con...
[1 reply] : Please do not crosspost. It clutters forum, spreads discussion on your... (by MiiNiPaa)
return for a function
 
I need the function char* getString(char* prompt) to return the name address and phone number. I cant figure out how to get it to return to the function and get...
[5 replies] Last: It will not (should not) compile if you call it with a string literal,... (by LB)
by abc1
switch statement
 
Hi, how to convert the following switch statement to if-else statement char ch; switch(ch) { case 'w':cout<<"good"; case 's':cout<<...
[6 replies] Last: char ch; if(ch=='w'){cout<<"good"; }else if(ch=='s'){cout<<"ver... (by jasonwynn10)
C++ Help
 
I need help finishing an assignment. How to pass my array to the function and return it as a sorted vector. I'm kind of lost with the functions part. Problem: ...
[2 replies] Last: please use code brackets. It makes the code easier to read and copy. ... (by jasonwynn10)
Returning to menu
 
...
[3 replies] Last: the code is still incomplete. (by jasonwynn10)
In-memory execution problem (1,2)
 
hello! i am facing a serious problem when trying to make an in-memory execution program. char code = { 0x00, 0x11 ...etc }; void *buf; buf = mmap (0...
[38 replies] Last: I found the problem. PVOID istead of void and everything run smo... (by vladimirr)
Getting an undefined reference error
 
NOTE: THIS IS HOMEWORK. PLEASE POINT ME IN THE RIGHT DIRECTION - DO NOT JUST GIVE ME THE ANSWER. THANK YOU! Here's my code: main.cpp (https://gist.github.com...
[7 replies] Last: > I just want to have the code in it's own little package Use a namesp... (by JLBorges)
Memory leaks
 
Hello, i'm searching a programm that can detect a special type of memory leaks, like these: int a = 12; char c ; char cc = c ; thanks Jan...
[8 replies] Last: > I guess you can do something similar in Visual C++ With Visual C++,... (by JLBorges)
by anhnha
Writing name in C, C++
 
Here are some definitions of class, struct and union. class CFoo { // CFoo is a CLASS defined by using 'class' keyword }; struct SFoo { // SFoo is a...
[2 replies] Last: I tend to agree the naming convention was used to indicate they were c... (by AbstractionAnon)
Returning 2d array from function?
 
Hello How can I return a dynamically allocated 2d array from a function? do I use like this: int main(){ char **array; array=func(); } char ** func(){...
[8 replies] Last: done I did like this (*(ptrChar+i), word)..its working btw I had to ad... (by csstudent123)
by LB
Unusual C++/Qt syntax
 
https://github.com/ricochet-im/ricochet/blob/master/src/core/ContactUser.h#L110-L137[code firstline=110]public slots: void setNickname(const QString &nickna...
[2 replies] Last: That's pretty crazy, I've used the identifier slots before in my cod... (by LB)
by Salvo
Simple GUI
 
Hi guys, I am planning to write a software with GUI which is thought for people with no informatics software. Everything should be nice and easy to use. For th...
[1 reply] : This is what RPMs are for (or whatever package management system you w... (by Duthomhas)
Let's Play a Game
 
The authors of the PVS-Studio analyzer invite you to test your attentiveness. Code analyzers never get tired and can find errors a human's eye cannot easily ...
[no replies]
class inside of another class?
 
Hello people of the forum. i'm having a problem, i make a class inside another class, and now i can't create(PS: i make in a .h/.cpp)the objects for use the fu...
[4 replies] Last: i tryed Graphic::Draw draw; draw.Line( ... ); and this solved t... (by TheLeandroNex)
September 2014 Pages: 1... 910111213... 28
  Archived months: [aug2014] [oct2014]

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