
please wait
by kmce
Pointers
|
Hello, I am looking for some examples involving pointers, Ive been trying to get my head around them, on and off for a few months, and I believe I understand th... |
Jan 28, 2019 at 2:46pm
[11 replies] Last: Alright, I've never encountered situations where an array wasn't decay... (by Uk Marine)
|
by steventan
if statement working in windows but not in ubuntu
|
Hello! I have a if statement that is working in windows but does not work in ubuntu. I have tried putting a cout statement above my while loop to test it was ... |
Jan 28, 2019 at 11:53am
[13 replies] Last: If he outputs something after it could overwrite the previous output w... (by Peter87)
|
by rapanomalous
getline() glitch
|
in my sms(student management system) when i use the getline() to take full name and store in to a vector the program "glitches" i really don't know how to descr... |
Jan 28, 2019 at 11:46am
[5 replies] Last: yeah that really helped; thank you Dutch thank you Andy i am much grat... (by rapanomalous)
|
multiset, iterator and insertion |
My college senior told me that if I make iterator to multiset and insert in the multiset it would not break the iterator. Is it true? Multiset can change value... |
Jan 28, 2019 at 9:27am
[4 replies] Last: set and multiset are normally implemented as binary search trees ( h... (by Peter87)
|
by Bopaki
error: 'conversation' was not declared in this scope
|
I cannot find what is wrong with this program, but I get the above error. //This is the definition for the class StringVar //whose values are strings. ... |
Jan 28, 2019 at 7:57am
[2 replies] Last: Thanks very much!!! TheIdeasMan (by Bopaki)
|
by CasBlue
Randomly selecting a number from an array based on probability
|
Currently using an array with probability in a class, but i'm having troubles making a procedure that would show what number would appear based on what random n... |
Jan 28, 2019 at 7:45am
[4 replies] Last: Initializing at declaration is perfectly legal and should work with co... (by Grime)
|
by deello
How to pass vector into 2d array?
|
I have a text file with of content like this: [1,1]-3-Big_City [1,2]-3-Big_City ....etc. I have read the file and tokenize string into vector<string>. The... |
Jan 28, 2019 at 7:19am
[1 reply] : You can simply use push_back as you did for the string: void displayC... (by coder777)
|
For Loop / getline() Problem |
I'm trying to solve this problem: https://open.kattis.com/problems/carrots In short, I don't see what I'm doing wrong with my for loop. It should ask for inp... |
Jan 27, 2019 at 8:45pm
[4 replies] Last: @dutch Ahhh okay. I understand what you mean now. Thanks! (by PiggiesGoSqueal)
|
by ianlee521985
Help with showing decimal points
|
Hi I have to do this assignment where I convert KMH to MPH, and the result needs to be a decimal place. This is what I have so far. #include <iostream> ... |
Jan 27, 2019 at 7:58pm
[2 replies] Last: Ok it works now, thanks (by ianlee521985)
|
by redfury
Problem in swapping of array indexes
|
Hello, I am making a program in which I am supposed to solve a mathematical expression using DMAS rule.. I am supposed to take an expression in a character ar... |
Jan 27, 2019 at 6:18pm
[5 replies] Last: Hello redfury, The following code is not pretty, but it does show som... (by Handy Andy)
|
Array as function parameter, the pointer increment does not count for callee |
#include <iostream> void plusOne(int* array) { array++; std::cout << *(array) << std::endl; } int main(int argc, char *argv ) { int array = {0, ... |
Jan 27, 2019 at 3:47pm
[2 replies] Last: > What does it mean to increment array+1 in the calling program? I me... (by CakeByTheOcean)
|
bit programming -> take out the bit at odd/even index |
Assumed we have a uint16_t as 1100110011001100 How can I take out the bit at odd or even index, then return a uint8_t, since half of the input. uint16_t ... |
Jan 27, 2019 at 2:29pm
[3 replies] Last: or think about it for a bit ;) you want to grab every other bit into a... (by jonnin)
|
Quick sort pivot is middle element |
There are absolutely no resources for quicksort with the middle element as the pivot. Can anyone give me a link to learn it? My own implementations are failin... |
Jan 27, 2019 at 12:02pm
[3 replies] Last: I can do from left or right most pivot (by closed account 1vf9z8AR)
|
by Steve02
Set char 1 = char 2. What is syntax?
|
I've been searching for this but found no examples or discussion. I'm trying to input the value to one char using the value from another, like: char i... |
Jan 27, 2019 at 11:59am
[4 replies] Last: Recreate strcpy() or other C-string handling functions from Standard ... (by H00G0)
|
by structJason
Is there a string conversion function to char type?
|
Hello, I want to ask about a question that bothers me for quite a while. In C#, there are functions that convert string to other variables such as Convert.ToIn... |
Jan 27, 2019 at 11:06am
[6 replies] Last: Thank you Grime and jonnin for the detailed explaination regarding thi... (by structJason)
|
by colton96
I'm having trouble with "if else" statements
|
So I'm very new to C++ and I taking a class on intro to programming and this is one of my assignments and I'm having a problem with the last part of the code wh... |
Jan 27, 2019 at 8:46am
[7 replies] Last: > cin>> nInput, Ucap, Lcap; I would suggest you print out those 3 vari... (by salem c)
|
by usmannazir
Loop
|
Dear Friends I want to stop the following code when all entities in the error are simultaneously less than one. And if even one entity be greater than o... |
Jan 27, 2019 at 4:12am
[10 replies] Last: It worked well in my full code. I think the code will only break when ... (by usmannazir)
|
exception handling |
I found an example from an article about exception handling, but there wasn't explained whats the meaning of 'const throw()' beyond the what() method header is.... |
Jan 26, 2019 at 9:54pm
[3 replies] Last: Note that this way of using the throw() syntax on functions has been d... (by Peter87)
|
Compare two unsigned 8 bit int |
Hi I have a simple question but in a situation. How can I compare two 8 bit int a, and b, in the situation <, >, = these comparison are defined only on the sig... |
Jan 26, 2019 at 8:12pm
[7 replies] Last: This was the OP's justification: I could use the SIMD signed compari... (by lastchance)
|
by toradora
Swap max and the first element of the linked list (end of input 999)
|
Do i find max value without mistakes? And pls explain an how to swap elements by a given condituon #include <iostream> using namespace std; struct Nod... |
Jan 26, 2019 at 4:41pm
[1 reply] : if the data is small (like, an integer or something) you can swap the ... (by jonnin)
|