General C++ Programming - January 2021 (Page 5)

Capacity of queue
 
I'm currently making a mock up playlist using queue but I have this problem wherein It won't read up to 5 title from my textfile song directory rather it only r...
[8 replies] Last: Try your old account again, it appears to have been restored. Or keep... (by George P)
Error in Code when compiling
 
Hi, I am having an error in my code and cannot seem to find the problem. When I compile the following code I get an error "break statement not in loop or ...
[4 replies] Last: Thank you for your reply Salem, May I email you my full code for you ... (by firdoshnd)
Return value of function when return path not specified
 
> Could one treat this as guaranteed behavior? No.
[14 replies] Last: Sayonara to the OP then. (by George P)
by mpg
Concatenated list and tree
 
I need aid for this exercise. The function BuildT must use the following parameters nodeE* buildT(node* T, nodeE* C) and as a struct I must use the following: ...
[2 replies] Last: nodoE* buildT(nodo* T, nodoE* C) { return T ? buildT(T->left, bu... (by dutch)
Credit card validation
 
Hi I am very new to c++ programming and I was wondering if anyone could help me with a task I have been given. I have been given the template for a credit card ...
[3 replies] Last: post the full text. did they not tell you what the tests for the ass... (by jonnin)
Object Oriented (1,2)
 
Hello, I've been trying to read from a .sgm file a certain document. But it has tags and characters like "<" and ">" which should not be printed onto the consol...
[29 replies] Last: While I was writing this many more answers have appeared. It is a try... (by oggin)
Which subclass process is better?
 
Which subclass process is better? I have found two ways for subclassing the control window classes (buttons, edit boxes, list boxes, combo boxes, static contro...
[2 replies] Last: Coder777, Thank you. I was studying how to make two text boxes (one ... (by BobQuarter)
Win32 GUI version of moving cursor in text?
 
Using the left and right arrow keys on the keyboard: C++11 Windows 32 GUI I have the following code. I have been trying to move the cursor that is in the te...
[2 replies] Last: That did not help me. I am not faulting you or Microsoft. I am saying ... (by BobQuarter)
It execute well but not looping
 
#include<iostream> using namespace std; struct Employee{ char name ; float rate, daysWork, lessDeduction, cashAdvance, absences; float netSalary; };...
[2 replies] Last: And near the end, needs braces around the last 3 lines. (by TheIdeasMan)
Its not giving me the proper output. Please help. What is wrong here ?
 
#include <iostream> using namespace std; int addnumber(int ,int ); int subsnumber(int , int ); int multiply(int , int ); int division(int , int ); i...
[1 reply] : c is of type int so if (c== 1) and the same for the other if sta... (by seeplus)
How to check if a regex is a simple string?
 
Something like this, perhaps: bool has_no_unescaped_special_chars( const std::string& pat ) { // a regex special character either preceded by any charact...
[3 replies] Last: Yes, put that & on pat parameter for sure. Good catch. JLBorges fixe... (by jonnin)
How to take input from the user with using set and get functions?
 
I try to take input from the user with using set and get functionsin different member function. This functions are member functions of same class.
[1 reply] : This just sounds like basic class design. Have you gone over what clas... (by Ganado)
Need help to write a function using Annotations(Microsoft SAL)
 
Hi everyone! I have to implement some functions using SAL Annotation to simulate a student platform. I just need to see how to create 1 function so i'll have ...
[1 reply] : Did you read this: https://docs.microsoft.com/en-us/cpp/code-quality/... (by coder777)
2d dynamic array.
 
Hi I have to create a database of student. User can add and delete student from the DB. I have to do this only with array and not std:vector and only use char a...
[10 replies] Last: I was trying to say that this kind of deeply nested code makes softwa... (by seeplus)
accessing class in shared object (library)
 
In short: I have a library (.so) that has C++ classes implemented. Now I want to be able to access a class in the lib. Example: #include "myclass.h" main (i...
[4 replies] Last: If the IDE has a bug, then I'm not quite sure what we can do, but mayb... (by Ganado)
binding reference of type 'unsigned long' to value of type 'const unsigned long' drops 'const' qualifier
 
I defined two functions for my Solver class as follows: solver.h class Solver: public DSPOMDP { friend class State; protected: ...
[11 replies] Last: @dutch exactly I fix some problem another one pops up. Well, if someon... (by neuronphysics)
Localtime_s and strcpy_s
 
Please advise how to make errors and warnings in the following three situations go away. Thank you in advance. Situation 1 char buffer ; void get_time(...
[3 replies] Last: For the Microsoft implementation of the library (Visual Studio), which... (by JLBorges)
return maximum value saved as a series of values turn to bits
 
Can anyone suggest how I can write two functions: First one would allow me to push a single value but with a possibility to store a series of numbers in the ran...
[4 replies] Last: @dutch Thanks for the explanation. It was very helpful. :) (by neuronphysics)
break inside while loop
 
while(n>0){ int check=n%10; if(check==0) ??????? if(n%check==0) divi++; } how would we stay inside this while loop ...
[1 reply] : continue should work just fine. Or you could do this: while (... (by dutch)
SQL Server connection over socket on listening port issue
 
Hi All, Happy New Year! I’m writing this for an issue I'm facing when I'm connecting SQL Server using direct socket (C++) on port 1433 (or any other po...
[no replies]
January 2021 Pages: 1... 3456
  Archived months: [dec2020] [feb2021]

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