Beginners - June 2019 (Page 4)

Parent/child focus button in WM_COMMAND
 
Having this code, the button "G" in WM_COMMAND associated with 10001 does not work anymore, because the parent/child focus does not resemble I think. Button "G"...
[1 reply] : https://en.wikipedia.org/wiki/Comparison_of_version-control_software O... (by salem c)
by Mark22
Group project, with different IDEs, and third-party libraries
 
Hello, i hope this to be the rigth forum for my question, anyway i wrote it here because i'm a beginner so this is the problem, im on a group project and in thi...
[3 replies] Last: > we are using OpenCV for the graphic interface opencv is used for ima... (by ne555)
extensible enum class?
 
Hi I'm working on a larger project at the moment, for which I am developing a class (call it X class and X objects). This class currently allows the user to sp...
[3 replies] Last: > I'd like the client/user to specific their own enums. If the class... (by JLBorges)
Dynamic Memory
 
Hello, I want to ask : 1. Why do we need to delete a pointer when we have use new pointer?? //I have ever read because it causes memory leak, but I dont und...
[6 replies] Last: Ah I see, that makes sense now. Thanks for the insight! (by zapshe)
Do I need to use double parenthesis within if statements?
 
I've seen different practices done by people writing C++ code. Which is right and does it make a big difference? if (varOne > varTwo && varOne > varThre...
[2 replies] Last: +1 I always use parentheses to make my intent clear, and to avoid t... (by Duthomhas)
Why does using a looping switch in the main function affect other functions?
 
while (userChoice != 3) { switch (userChoice) { case 1: someFunction(); break; case 2: anotherFunction(); break; default: cout << "\n\n""ERR...
[2 replies] Last: Hello jsmithplus, The use of code tags is good, but watch your indent... (by Handy Andy)
Couple of questions for an array problem
 
Hi! I'm currently in a beginning C++ working on a programming lab assignment. Spent the past few days working on this and there are just a few things I cannot f...
[10 replies] Last: Does this seem correct? Yes, that's the right way to do it.... (by dhayden)
MACROS overload (1,2)
 
hi all #define S(...) printf("%s %s","AT","OK") #S S1 #define S1(x) printf("%s %s",(x),"OK") #S1 S2 #define S2(x,y) printf("%s %s",(x),(y)) S(); //print ...
[23 replies] Last: Update: 2nd question is not actual any more. So now I have for 0..2 ar... (by alexblade)
Put code before or after break in a switch case?
 
I use break on default because it's said to be good practice. But, should I put this final function call (where to go next) after or before the break? Is this w...
[1 reply] : break sends control to the end of the innermost loop or switch. Any... (by mbozzi)
How can I calculate index of error between two curves?
 
How can I calculate the index of error between two curves? I want to make a program to calculate index of error between two Curves (one measured and the other ...
[12 replies] Last: This part of the file.data with the script I sent earlier results are ... (by hanoufNS)
How to use string or char as a reference to variable?
 
I need to take a character as input which will match either one of the already created variable. Now, how can I send this character to a function as the referen...
[9 replies] Last: #include <iostream> #include <vector> #include <map> using namespace ... (by anup30)
Segmentation fault passing reference vector<string> into class member
 
So... this is my situation main.cpp #include <iostream> #include <vector> #include "foo.h" using namespace std; int main(){ * * * fo...
[3 replies] Last: You should #include <string> btw. I ran it, got no segmentation fault... (by zapshe)
const pointer
 
I dont really understand this program... Can somebody help me to understand this program.. int x; int * p1 = &x; // non-const pointer to no...
[1 reply] : A pointer is simply a variable that holds the memory location of a var... (by zapshe)
Two Variables in one for loop
 
http://www.cplusplus.com/forum/beginner/59662/ I tried for (char **list = (char**)pa, int i = 0 ; *list && i<5; ++list, i++) but get error error: ex...
[8 replies] Last: The syntax is described in https://en.cppreference.com/w/cpp/language/... (by keskiverto)
User input from keyboard not loading??
 
People, Just going through some quick exercises in Dr. Stroustrup's book "Principles & Practices..." and I am using code that HE gives for getting user input...
[19 replies] Last: In a way, that was Stoustrup's purpose. He uses simple approaches to s... (by Niccolo)
Crash on dynamically adding buttons
 
Each time clicking on button "+", a new button "G" comes up (no maximum applies). Each time clicking on button "G", a new button "GTR" comes up (maximum is 4 fo...
[3 replies] Last: out here, we'd have to be able to compile a working example, and the c... (by Niccolo)
Getting error when trying to make a cout and cin code
 
I am trying to make a text based game to help build my c ++ knowledge. I just started and I am already running into problems. When I build my code I get an erro...
[7 replies] Last: Have you ever tested input two words with a space between them?like "J... (by perfect HFY)
Asterisks
 
I have an assignment where we are to write a small program that asks the user how many asterisks it should print out. The user responds with a number then the ...
[7 replies] Last: Another way to do it (if you want to use std::string) is to do that : ... (by Zaap)
Help with composition A has B and B has A
 
Hi, I am creating a hospital management system program. While coding I encountered some problems for Patient Class and Doctor class. I would like the Docto...
[2 replies] Last: I am creating a hospital management system program. ... that real li... (by keskiverto)
char array through function
 
Center For Modern Dance On Monday night, each one of the finalists was given the job of performing two dances. Extremely first dance was supposed for you to ...
[2 replies] Last: I think we have some trolls here: http://www.cplusplus.com/forum/begin... (by lastchance)
June 2019 Pages: 123456... 13
  Archived months: [may2019] [jul2019]

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