
please wait
by david73
Initializing two-dimensional vector of type Class
|
Hello, I have one question. When I was using int as type of my vector I initialized it the way you can see below. But now, I want to create vector of type Valu... |
Jun 30, 2017 at 6:53pm
[1 reply] : # include <iostream> # include <vector> # include <iomanip> class V... (by gunnerfunner)
|
by Meden
Where is my mistake? Project Euler Problem 9 - algebra, <complex>, or something else?
|
From: https://projecteuler.net/problem=9 "A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a^2 + b^2 = c^2. There exists exactly... |
Jun 30, 2017 at 6:35pm
[5 replies] Last: I should make a, b, c ints, or you may hit floating-point round-off er... (by lastchance)
|
by ebii
interhance
|
hey guys iam a bit stuck with some program that i try to solve #pragma once #include<iostream> using namespace std; #include<iostream> #pragma once templat... |
Jun 30, 2017 at 6:01pm
[3 replies] Last: You probably want runtime polymorphism : #include<iostream> #include... (by keskiverto)
|
by masterinex
weird for loop
|
Could someone explain to me how this for loop work ? i just don't understand the 2 extra conditions: beg = authors.lower_bound(search_item), end = authors.u... |
Jun 30, 2017 at 5:38pm
[1 reply] : Those are not conditions; they are just assignments. The condition is ... (by Zhuge)
|
by lifeisgood
continue statement
|
Quick question: assume that I have the following structure, will the "continue" command successfully lead me to the next iteration in the outermost for loop? ... |
Jun 30, 2017 at 3:30pm
[7 replies] Last: @mbozzi: thank you for referring me to this article! As I am not a nat... (by lifeisgood)
|
by MoreUmph
Problem Linking Headers and Source File
|
Hello, im new to c++ and am trying to link a header and source file to my main source file. Its simple and ive looked at videos everywhere and read alot forum ... |
Jun 30, 2017 at 1:47pm
[14 replies] Last: > undefined reference to `WinMain' chose `Console Project' (by ne555)
|
by masterinex
how to iterate through char array
|
i have associated a pointer to a char array. I would like to print each element of the char array using the dereference pointer notation. for some reason it wou... |
Jul 1, 2017 at 10:11am
[11 replies] Last: asd (by masterinex)
|
by primem0ver
Where is the lib definition defined in a project?
|
Although I am not new to C++, linking has always been a bit confusing for me... so I suppose this may be a beginner question... ?? If I am using a dll and link... |
Jun 30, 2017 at 11:31am
[1 reply] : Where is the STGPLUGINCLASSES_LIB symbol typically defined? Usually ... (by coder777)
|
Can I code this better? |
Few questions here, I thought I could use Nested else if statements here but I'm trying to go exactly what the program tells me to do. I may of over-complicated... |
Jun 30, 2017 at 12:02am
[1 reply] : struct substance{ double fusion_temp, ebullition_temp; std::string ... (by ne555)
|
by masterinex
how to declare a reference to a pointer
|
i would like to create a function which takes in a reference to a pointer.for some reason when i build this, I keep getting cout and endl undeclared identifier.... |
Jun 29, 2017 at 11:26pm
[1 reply] : The error you encountered is due to using namespace std; coming afte... (by lazpeng)
|
by Caruso
2d array
|
Hi All, This is from a problem published on heakerearth.com We need to create a 2 dimensional array and fill it. for the creating of the array I've used: ... |
Jun 29, 2017 at 7:47pm
[1 reply] : this is all weird. if you want 10 columns, n = 10. you get to it fro... (by jonnin)
|
what are the benefits of using Copy initialization form ? |
i know that when we use the copy form (=) the compiler will pass the right-hand operand to the copy-constructor of that class. in addition, the compiler ca... |
Jun 29, 2017 at 12:50pm
[5 replies] Last: thanks keskiverto , gunnerfunner for replying. i just wanted to know i... (by AhmedEl3agamy)
|
Reading hexadecimal from file and converting to integers |
So my assignment is to read an unknown amount of hexadecimal numbers from a file into a char array, create a function to convert it to regular numbers, and then... |
Jun 29, 2017 at 12:38pm
[9 replies] Last: The conversion and subsequent addition to a sum is where I'm having m... (by dhayden)
|
by masterinex
how to check if a command line argument ends with .txt
|
I am trying to write a program which checks if one of the command line argument entered ends with .txt . If one of the arguments ends with .txt, then an input ... |
Jun 29, 2017 at 12:18pm
[7 replies] Last: The code will check for ".txt" in any command line argument, so long a... (by dhayden)
|
by Stauricus
i/o vector of strings to text file
|
hello i'm trying to write and read a vector of strings to/from a text file. it should count how many lines contain the word "here". but it does nothing. ... |
Jun 29, 2017 at 11:00am
[5 replies] Last: oh, now i see why the text file wasn't human readable. thanks everybod... (by Stauricus)
|
by waschbaer
How could I test whether the input parameter is uninitialized (1,2)
|
I have 4 arguments are integers, and for consistent reason, I want to test the input argument is initialized with a number. How could I do this? UPDATE: Thank... |
Jun 29, 2017 at 10:44am
[20 replies] Last: @JLBorges What is your problem? If the functionality of optional mee... (by coder777)
|
by David5956
How do I merge text files in different sub-folders with path in it?
|
as tile~ so far, I did output a dir.txt that listed all the targets with this CMD code: D:\>dir /s /b Parent\*.txt >D:\dir.txt inside dir.txt: D:\... |
Jun 29, 2017 at 5:11am
[1 reply] : std::filesystem::recursive_directory_iterator (C++17) http://en.cppref... (by JLBorges)
|
by Flaze07
syntax question
|
hey, so there's 2 ways to declare a variable of class first : mystring ex("lol"); second : mystring ex{"lol"}; which one is better ? |
Jun 29, 2017 at 4:22am
[3 replies] Last: One thing to keep in mind is that they are not always equivalent: The ... (by mbozzi)
|
by david73
Moving in two dimensional vector
|
Hello, I'm having one problem. Imagine you are having two dimensional vector in which you want move generated number and you will get this: 0 0 0 0 0 2... |
Jun 28, 2017 at 6:13pm
[9 replies] Last: Just in case someone would struggle with the similar problem in the fu... (by david73)
|
by ebii
handling with files
|
hey guys how i read from files only int/or some char data let say i have list of student name + grade in file like name1 80 name2 90 and i want to take fro... |
Jun 28, 2017 at 6:12pm
[5 replies] Last: thanks alot thomas . (by ebii)
|