Beginners - January 2021 (Page 9)

Question
 
Hello everyone. I want to ask one question. Do you know any websites where I can solve programming questions of C programming language. Because I need to prepa...
[2 replies] Last: Hello Aslanchik, I did not see this on the "vjudge" list. https://pro... (by Handy Andy)
Question about a code
 
Hello guys! I have a question (which may be kind of not serious. Why exactly my visual studio compiler does not accept int arr (it states that expression must ...
[6 replies] Last: Thank you for your replies all. No that's ok with the dynamic programm... (by gevCplus)
How to pass reference of ifstream to function that expects istream
 
I have a Lexer class, and one of its members is an istream reference. I chose to make it an istream in order to support any kind of input streams that inherit f...
[2 replies] Last: Ah, you're right. It seems that Visual Studio was just highlighting th... (by steveRoll)
vector,array,c++
 
hello everyone. could anyone please tell me if writing a code this way is considered to be correct? i mean adding vector as an argument in TreeSort function, bu...
[1 reply] : T arr as a function argument is equivalent to T* arr , so yes you ... (by Ganado)
by joe809
Store Values into an Array
 
I'm trying to store random numbers generated from the function using a loop but I don't have any idea how to even store the values into the array from a loop. ...
[8 replies] Last: Thank you all for the help. It was very helpful and I'm actually getti... (by joe809)
by PK Dey
Constructor doesn't work
 
Hello! every one. The following program works #include<iostream> #include<conio.h> using namespace std; class student { public: int id; double gpa ; ...
[2 replies] Last: and default initialise id and gpa class student { public: int id {... (by seeplus)
Iterating data on C++ Visual Studio
 
I have some data from arduino and want to show it at C++ CLR Windows form visual studio 2019. Everything is good but this is the problem. Oh ya btw I'm newbie...
[6 replies] Last: What does "shows the iterate' mean? the data is in binary form Does ... (by coder777)
Passing the data from file to the function
 
Hello everyone , I need a small help for my c++ function. I am writing a function called "calculate". The Pr array is a data in a file called "fileX" and i...
[3 replies] Last: Hello learner999, In addition to what Mif said it is best to provid... (by Handy Andy)
Potentiometers vs Rheostats
 
Write your question here. Hey Everyone, This is a little off topic. I found an earlier post http://www.cplusplus.com/forum/beginner/247175/ on this fo...
[4 replies] Last: There is a lot of blanket reporting going on, deleting a number of new... (by deleted account xyzzy)
rvalue / lvalue
 
I am learning about r and lvalues and I think i am following the basic concept, but on the site I am learning from there is a piece of code that I am a bit conf...
[1 reply] : The key, from what I understand, is that you can't take the address ... (by Ganado)
by emcp
Attempting to use Templates and a class I define not compiling/loading
 
I am learning a bit of thread programming via this book C ++ Concurrency in Action. In the current place I am stuck, I am trying to test out thread safe object...
[9 replies] Last: -- Conan: Adjusting output directories -- Conan: Using cmake targets... (by emcp)
tuition calculator
 
this is the excercise Suppose that the tuition for a university is $10,000 this year (year 1) and increases 5% every year. Write a program that computes th...
[14 replies] Last: Hello akira5555, Sorry for the delay. After testing your new code an... (by Handy Andy)
by hbcpp
How to get the keyboard layout
 
How I am trying to get the keyboard layout name (for example US Keybord or Portuguese Keyboard) from within c++? I used this: HKL kb = GetKeyboardLayout(0); ...
[1 reply] : Maybe https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-wi... (by deleted account xyzzy)
by hbyte
Particle Swarm Optimization
 
Here we are finished on a new machine. The last two machines broke down. But I finished before new years. The PSO - Partical Swarm Optimization algorithm has...
[7 replies] Last: I haven't a clue. I only tried Holder's table. Holder's : Global Bes... (by lastchance)
Passing enum variable to a function
 
I am trying to pass an enum variable to a subroutine. The code is shown below. I thought that the declaration enum I2C1_MESSAGE_STATUS humid_status; woul...
[6 replies] Last: [quote=fsonnichsen]All of this is a bit strange to me as I do not real... (by closed account z05DSL3A)
Constructors and arrays
 
I'm currently in school in my second c++ class. (ADVANCED C++) To be quite honest, these courses are terrible. Learn more on youtube. Anyways, I'm struggling w...
[4 replies] Last: I've made some changes (eg initialiser list, pass by ref rather than v... (by seeplus)
by joe809
Random Number using Function
 
Hello everyone! I'm trying to make a game where the program gives you a random number(char) from an array. The problem is that for some reason it keeps retu...
[3 replies] Last: I managed to get it fixed without having to make a loop. I just added ... (by joe809)
by hbcpp
Encrypt/Decrypt File with Crypto++
 
I have found this two functions in a post. void EncryptFile(const char *fin, const char *fout, const char *passwd) { FileSource f(fin, true, new Defaul...
[6 replies] Last: @jonnin You will have to learn the LIBRARY (what functions to call in... (by hbcpp)
by skcpp
Simple question on pointers
 
In below code, foo points to the address where the value of bar is stored. Should I be able to find the address of foo itself using yet another pointer xyz? ...
[6 replies] Last: Okay, thanks all. (by skcpp)
by yem
compiler Error???
 
Anyone know why I'd be getting an E0304 in visual studio for the line with the comment? It's part of a bigger code but I don't think the rest is relevant... ...
[7 replies] Last: Use emplace rather than insert: codeMap.emplace(temp, encodedChar);... (by seeplus)
January 2021 Pages: 1... 7891011
  Archived months: [dec2020] [feb2021]

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