Beginners - January 2019 (Page 15)

by KB93
Find Index of Closest Value in a Vector of Struct
 
I have txt file with values for temperature, voltage, and sensitivity which I am reading into a vector of a struct. TEXT FILE SNIPPET Temp. Voltag...
[2 replies] Last: #include <iostream> #include <fstream> #include <sstream> #include <s... (by lastchance)
by yat89
remove_if
 
Hi everyone, I'm a new to c++ programming. I need some help to solve my task. I need to remove values (1 and 2) in 2d vector. I'm trying to use remove_if functi...
[11 replies] Last: Its work. Thank you @dutch for your help. (by yat89)
by Trib
prime, for, while..help
 
so, i have got a problem that says a number x is read, with that number, find the x'th prime number, e.g x=4, the x'th prime number will be 7 (2 is first, 3, 5,...
[6 replies] Last: Of course my code runs without error, but it is lack of generality. Ev... (by locatee)
find size of an object of a class
 
What will be the output of the following program? #include<iostream> #include<string.h> #include<stdio.h> using namespace std; class publisher { pub...
[1 reply] : What will be the output of the following program? The output is im... (by mbozzi)
by KB93
Binary Search Vector For Closest Value
 
Like the title says I am trying to use a binary search method to search a sorted vector for the closest given value and return its index. I have attempted to us...
[12 replies] Last: solved double Convert::convertKtomV(double value) const { auto it... (by KB93)
Lucky Number Game Problem
 
Show your code i can help u
[1 reply] : 1 5 2 3 2 4 6 8 12 O/P - BOB (by cool123dude)
by KB93
How to Read Text File Starting at Numbers
 
I am trying to read this text file into three separate vectors, one for temp,voltage, and sensitivity. Temp. Voltage Sensitivity (Kelvin) ...
[9 replies] Last: You can convert to millivolts in the input function: istream& opera... (by dutch)
by d0enas
Mathematical actions C++
 
Hello, I'm newbie in this forum and new to programming languages... I need to somehow make a mathematical console app, but have no idea where to begin.. May...
[2 replies] Last: The program calls for a class to represent rational numbers and whole ... (by dhayden)
by powsem
Net beans optimized out
 
Hello every one! I use Net Beans on Arch Linux. How I turn off optimization in g++, for view values of variables? I'am trying: 1. "Project properties...
[8 replies] Last: I heave read: "if I see "<optimized out>", and don't use variable, th... (by powsem)
by Mrsoap
Simple error I need help with
 
I'm pretty new to this so please bear with me. I'm getting an error over the '.' in the code. What I'm trying to do is tell my Object manager class to ru...
[2 replies] Last: Hello Mrsoap, It would be better if you post the whole code as the er... (by Handy Andy)
How do I make this shape in C++?
 
This is the shape that I am trying to make. Apparently, this was made by using box drawing characters. I tried using them in C++ but all I got is "?" instead of...
[3 replies] Last: Hello redfury, What I have found with VS2017 is that the IDE and the ... (by Handy Andy)
mouse click
 
How can I create a mouse click in (graphics.h) to appear console? example: create a button (play game) if i press this button appear me console. Edit articleD...
[2 replies] Last: i use windows and i use c++ language with coode blocks compiler (by tiank2000)
by MJnoob
Checking if input is in the array already, and if its int or not
 
so I just started learning c++ and I am supposed to make a guessing game between 1-100 in c++ where I need to ask the player's name and store it, need to keep t...
[10 replies] Last: Hello MJnoob, oh yes, I thought you meant I have to make a header fo... (by Handy Andy)
Redirect index.php to your domain
 
Hello, I want to say: www.domain_com / index.php Make Reedirect 301 on: www_domain_com Now either the redirection is 301 or I can do it with a flashing mode I...
[1 reply] : So what's your C or C++ question? (by salem c)
recursively print character using if and while
 
what is the different of using while and if here? why if i use "if" it produce correct result? but "while" doesnt? thankyou!! #include <stdio.h> #inc...
[5 replies] Last: Basically this is an infinite loop: while(*k) (when *k is not NULL)... (by Grime)
Array sorting feedback appreciated :)
 
I was doing the Pancake Glutton excercise and just started trying to do a bit more with it. I used a 2D array and wanted to sort the numbers from lowest to high...
[2 replies] Last: I used a 2d array to add another complication for me to work around. Y... (by Hollowman)
Copy only line user wants from a full file into other file
 
I am writing a c++ code for my cafe project, which READ from a full file(list of drinks 10) 1.Coca 60 2.pepsi 70 3.Banana_Shake 80 4....
[2 replies] Last: ... (by Enoizat)
Date and time as string
 
I want to create a string that holds today's date and another one that hold's the exact time. How can i do this ?
[1 reply] : #include <iostream> #include <iomanip> #include <string> #include <ct... (by lastchance)
Rapid Fire
 
#include <iostream> #include <Windows.h> using namespace std; int main() { while(true) { if(GetAsyncKeyState(VK_LBUTTON)&0x8000) { mouse_...
[9 replies] Last: Clicked only one time. void click::loop() { //stati... (by jacapiwsko)
Can someone explain the logic of this codes please
 
QStringList Para_Meters; std::string Secret_Code; QString CaptureInterval; QString MaximumCaptureTime; std::string Para...
[6 replies] Last: It's hard to detect what the semantic of the code is. There are some v... (by nuderobmonkey)
January 2019 Pages: 1... 1314151617
  Archived months: [dec2018] [feb2019]

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