General C++ Programming - February 2022 (Page 4)

How to find a lower straight in a subarray without sorting
 
Hello, I am having some trouble writing the code to find a lower straight in C++. Here is what I have so far for that portion of code: int lowerStraight(i...
[3 replies] Last: Rather than sorting, put the die into a bitmap. Shift the bitmap down... (by dhayden)
is there a way to write a metafunction is_container?
 
Hi, I have a metafunction is_vector but how can I write one for all container types? This is my current code: template<typename T> struct is_vector ...
[4 replies] Last: thanks!! (by JUANDENT)
by AAAbb7
"if" statement not showing cout
 
I'm supposed to write a program that will give me the average scores for a practicum, and if the average is less than 67 then it should input the message: "You ...
[2 replies] Last: Don't use equality for floating point numbers. Due to the way that the... (by seeplus)
How do you find the min and max of user input number?
 
I've been googling all day and reading through my book, but I just can't seem to find the answer. int main() { double grade1; double grade2...
[4 replies] Last: You were close with L22! You need: cout << "Min = " << min ({ g... (by seeplus)
how write decimal number __asm
 
hello all , how write decimal number , error this line cmp eax,37000 void __declspec(naked) ourFunct() { __asm { mov esi,ecx cmp eax,37000 ...
[2 replies] Last: eax isnt loaded at this point beacuse it's hooking ,Thank you very muc... (by Hawlong)
Convert string with datetime value to one with date and time in C/C++ on Visual Studio
 
I am developing a C++ application on Visual Studio in which I have a string that contains a datetime value and I must convert it into another string with the da...
[3 replies] Last: http://www.cplusplus.com/reference/ctime/strftime/ #include <iostrea... (by lastchance)
problem passing string to a function
 
My current problem is that I had something that compiled without a problem. It worked with my old system perfectly. I had a function shown partially here: v...
[3 replies] Last: Thanks to "lastchance" it works. I guess when I upgraded to Windows 1... (by GeorgeSnyder)
If Statements With Multiple conditions
 
Ok, I'm working on code for a project, and I need to know how to use the if statements for if/else if/else with multiple conditions. This is the info I have to ...
[2 replies] Last: Duplicated: http://www.cplusplus.com/forum/general/282093/ PLEASE le... (by deleted account xyzzy)
If Statements With Multiple conditions
 
Ok, I'm working on code for a project, and I need to know how to use the if statements for if/else if/else with multiple conditions. This is the info I have to ...
[1 reply] : Duplicate: http://www.cplusplus.com/forum/general/282076/ Don't doubl... (by deleted account xyzzy)
Trouble shooting slow computer
 
I'm running the same code on 3 machines, but it lags on 2 machines. How would I trouble shoot this problem? Sorry if this is the wrong area to ask :( Thanks
[4 replies] Last: Also look at Task Manager to see what else is running and what cpu/io ... (by seeplus)
How to get ANSI value for char in C++
 
I have a file encoded in ANSI. I need Hex code for the char. For Example char: ^ ANSI code is 136 or 88(In Hex).
[4 replies] Last: C++20 adds a nice feature with <format> 's formatting library, simila... (by deleted account xyzzy)
Getting lnk1120 error message
 
I have been trying to compile a c++ program. I keep getting an error message lnk1120 1 unresolved external. I create a header file, an implementation file an...
[7 replies] Last: > My cell phone automatically capitalizes the first letter. I forgot t... (by salem c)
How to compile into a custom file format?
 
I am new to this forum. I have been programming in C++ for some time now, but I have wondered how to compile the code into a custom file format. Most IDEs compi...
[2 replies] Last: On unix I think executable is just a flag on a file, and extension is ... (by jonnin)
Too many array elements?
 
Hi, I am having an odd problem with my arrays. At present, I am creating the arrays in main and then passing them to other functions to do work on them and then...
[16 replies] Last: [quote=thmm]I forgot about... Welcome to my "world." I more often th... (by deleted account xyzzy)
I get error message frames missing and/or incorrect, no symbols loaded
 
I tried to write a c++ program. Got error messages that says frames maybe missing and/or incorrect, no symbols loaded. I am using visual studios community 2019....
[5 replies] Last: In an even more practical sense, if your program is useful enough to b... (by salem c)
namespace traceback
 
I´m trying to program something using the SDK of some software. In a lot of the .hpp files, there is some namespaces. Sometimes I can´t find the definition o...
[6 replies] Last: In VS, F12 and Ctrl+F12 on a variable/name lets it go to "Definition" ... (by Ganado)
Text-based Game
 
I'm halfway into my code, and I'm stuck, I'm not sure how to finish this project. I'm currently quarantined at home and don't have anyone to ask for help. If I ...
[11 replies] Last: Nice work! some little things to help you in the future. What you ha... (by jonnin)
user Register information using do-while loop
 
i wanna write a program that can register a user with name, address, age, course and gender. the the system will ask the user if he/she wants to register anothe...
[9 replies] Last: Without using operator>> overload for stream reading, then: #includ... (by seeplus)
How deform two 2D images to be correctly seen with 3D headset?
 
Hi, i've made my own 3D raycasting renderer, I've two simultaneous rendering: one with the ingame perspective a bit on the left for the left eye and one a bi...
[4 replies] Last: UPDATE: I've bought a "VR Box", one very cheap smartphone support, and... (by LakySimi1)
by frek
Thread exercise
 
Ex: Write a program with two treads: one that writes hello every second and one that writes world! every second. Is the following piece of code a right answe...
[4 replies] Last: Or use std:osyncstream with C++20 https://en.cppreference.com/w/cpp/he... (by seeplus)
February 2022 Pages: 12345
  Archived months: [jan2022] [mar2022]

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