Beginners - June 2019 (Page 5)

by st3686
Very confused , Vector
nevermind
Jun 20, 2019 at 12:32am
[2 replies] Last: nevermind <grin> nonetheless: // Example program #include <iostream... (by MikeStgt)
Quick question: C++
I made a simple program here to covert KG to LBS, but how would I for example make the KG count by 2. For example I want the KG chart to go 1, 3, 5, 7, 9, etc. ...
Jun 19, 2019 at 11:11pm
[2 replies] Last: Thank you. :) (by pwnsamp)
by kmce
Vectors (half open sequence)
Hi, I am learning vectors, and the book I am learning from is giving me information but not explaining it well enough. So I am hoping someone might be able to c...
Jun 19, 2019 at 10:54pm
[4 replies] Last: wow these explanations were very helpful, thank you all for answering.... (by kmce)
Some Char Array Difference
I want to ask if char word = {'H','e','l','l','o','\0'}; and char word = {'H','e','l','l','o'}; have any difference AND if cout << text; and...
Jun 19, 2019 at 5:03pm
[2 replies] Last: ^^ what he said. Ganado and I often cross each other posting at about... (by jonnin)
"undefined reference to" form cmake (translate a C project to C++)
Hi Everyone. I try to translate a small C project to a C++ one. With modifing the .c to .cc and little modifing in the Makefile using g++. But I have a followin...
Jun 19, 2019 at 4:41pm
[4 replies] Last: @ne555, Thank you. Duly noted. My experience has been as a linker er... (by Handy Andy)
by annw3y
Knuth-Morris-Pratt Algorithm
I found some code ahout knuth-morris-pratt algorithm , but i don't know what it means, can somenone please tell me what this code does, how it works. int kmp...
Jun 19, 2019 at 4:20pm
[3 replies] Last: The English version is also colorful, just not in a fancy table. It s... (by Duthomhas)
Code runs but nothing happens?
When I run nothing shows up and is immediately exited. /****************************************/ // Preprocessor Directives /************************...
Jun 19, 2019 at 1:30am
[7 replies] Last: :) It's good to know one's strengths and weaknesses (by Niccolo)
by tinaHR
while loop (cin>>)
Hi all, i am stumped with this problem, its very simple yet i cannot find solution anywhere. Please help. Code works and it outputs things from while loop as it...
Jun 18, 2019 at 11:06pm
[8 replies] Last: Any time. (by Handy Andy)
Small error
I got error ---- expected initializer before "void".Can anyone tell how to fix this error in line 37 ... ? #include<iostream> using namespace std; /...
Jun 18, 2019 at 7:51pm
[1 reply] : [quote=kavindu]Can anyone tell how to fix this error in line 37 ... ? ... (by lastchance)
Passing char array to function
Hello everyone. This is a question to capitalize the input name. E.g.: paul adams TO Paul Adams..Kindly correct the code. I'm having trouble in passing char arr...
Jun 18, 2019 at 6:09pm
[1 reply] : void uppercstring(char*cp) { if(cp == null) //complain about it ... (by jonnin)
How to find kth least significant bit?
This code is not passing all test cases? Can anybody tell me what is wrong with this code? #include<iostream> #include<algorithm> #define ll long long using n...
Jun 18, 2019 at 6:02pm
[3 replies] Last: example brute force / crude / fun solution prints the number in binary... (by jonnin)
by kmce
Could this program have been done better? (1,2)
Hi, I am trying to improve my programming by going through the Bjarne Stroustrup book, and one of the drills in it wanted me to write a program, which takes 3 i...
Jun 18, 2019 at 6:01pm
[20 replies] Last: No, it was deprecated, essentially made pseudo, unintentionally, but a... (by closed account 367kGNh0)
Stuck in middle of new Program
So im making a battleship game to help me learn the language, but im currently stuck on allowing the player to input custom ship positions onto the grid. *Some ...
Jun 18, 2019 at 5:29pm
[3 replies] Last: I ask the latter poster, will it make a difference if the contents of ... (by closed account 367kGNh0)
Temperature conversion
I am trying to write a program that will convert an array of temperatures to Celsius and display them with the Fahrenheit values. I have the program put togethe...
Jun 18, 2019 at 4:22pm
[9 replies] Last: [quote=kingfnie] //cant figure out what to call here to call functio... (by Ganado)
by Bopaki
The following two programs are identical to me but 1 shows correct results
here is the first one: #include <iostream> #include <queue> #include <list> using namespace std; int main() { queue<int> q1; queue<int> q2; ...
Jun 18, 2019 at 9:07am
[3 replies] Last: http://www.cplusplus.com/reference/queue/queue/ queues are implement... (by salem c)
Moving character on the map(2d array)
I am trying to make a moving character on the 2d map. When make it move with w, a, s, d keys it is doing well for w and a keys and for s and d it isnt. Where i ...
Jun 17, 2019 at 6:29pm
[4 replies] Last: Thanks its working. (by Aleksa03)
by RNBW
Brackets or not
One of the things I have never liked about modern programming languages is their use of brackets for the start and end of blocks of code. As I get older, my ey...
Jun 17, 2019 at 5:44pm
[16 replies] Last: @MikeyBoy I'd not realised that I'd configured the IDE to use tabs. I... (by RNBW)
helP
help help
Jun 17, 2019 at 5:24pm
[6 replies] Last: It's not commercial sp*m. Though nothing of value would be lost. (by Ganado)
by Bopaki
How can I get rid of that junk printed in front of the output
34 12 64 56 28 91 21 11 82 -999 Contents of q1:1990782048 34 12 64 56 28 91 21 11 82 Contents of q2:1990782048 34 12 64 56 28 91 21 11 82...
Jun 17, 2019 at 3:14pm
[7 replies] Last: I was for about 2 seconds. WTF was I thinking??? (by dutch)
For loop problem
I am writing a program to create an exam. I have pretty much everything working, and the code runs, but I can't make it choose between T/F and MC questions. Als...
Jun 17, 2019 at 2:17pm
[2 replies] Last: Hello Draveis, Your dearth of code poses more questions than just wha... (by Handy Andy)
June 2019 Pages: 1... 34567... 13
  Archived months: [may2019] [jul2019]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.