Beginners - June 2019 (Page 11)

error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
 
I want to change the characters in a string passed by user, converted into a C-style string and passed as an argument to a function with a char * argument: #...
[8 replies] Last: #include <cctype> #include <iostream> using namespace std; void func... (by lastchance)
Dragging circles
 
I am restructuring my code as I was told; now I want to drag and drop my drawn circles as follows: each single circle must be draggable and droppable independen...
[1 reply] : I am concerned that you are still struggling with this. I think you ar... (by Duthomhas)
by GonlyG
string .erase getting rid of vector element
 
I'm trying to use code from stack overflow to get rid of dashes from multiple strings that I input, but it's getting rid of the element entirely. #include <i...
[5 replies] Last: it has to emulate a circular array, but I'll try split (by GonlyG)
How to emulate a string with char array without oversizing?
 
I am sure it is possible, but I can't think up of a better idea than malloc ing recursively, without declaring an oversized array. Can anyone please tell me a ...
[5 replies] Last: These points come to mind on this subject: A few strings with over-al... (by Niccolo)
Using endl
 
I have only just started to learn C++ and i really would like some help please. I typed out a multiple expression and ended it with endl but the correct answer...
[6 replies] Last: BTW, you only need to use endl if it is important to make sure your ... (by Duthomhas)
pointers and string literals
 
Hello. In the code below, foo is a pointer that points to the first element of "hello", which is 'o'. Then how can foo be valid? I don't understand why foo als...
[1 reply] : (1) The first element of "hello" is 'h'. (2) Using square brackets (w... (by Duthomhas)
pointer arithmetics and runtime error
 
I am using the following code to learn how pointer works. It complies and can print out results, but also gives me a runtime error: Stack around variable myvar ...
[3 replies] Last: Why is that memory address invalid? Is it because I must declare the ... (by MikeyBoy)
by Bopaki
How can I solve this error
 
C:\Martin\MalikChapter7\reverseStack\stackType.h:203:1: error: invalid use of template-name 'linkedStackType' without an argument list linkedStackType::rev...
[2 replies] Last: Thanks its all sorted out (by Bopaki)
unusual linker error Portaudio
 
I attempted to compile the portaudio code examples with gcc in the command line. I know that if the something is defined externally the linker needs to be able ...
[12 replies] Last: I think what you are saying will contextualize itself better once I wr... (by Willogical)
Doubt guys big doubt pls help
 
hey guys is it illegal to open and access the source code of a windows app?? answer quick guys can i open the source of a game in my windows 10 if it is possibl...
[5 replies] Last: Ey dutch! Thanks a lot for this link :) ...when all words fail (by MikeStgt)
Stroustrup book problem with code example
 
Hi folks? I need an advise. I have problem with code I don't understand the matter of it doesn't work: the problem is every time i see the finale line: "I ...
[8 replies] Last: Enoizat, thank you! (by DenSilver)
Problem with sorting with the iterator.
 
The code I provided finds the largest value of each row in my matrice, and saves it along with its index. What I want it to do is find the largest values in th...
[7 replies] Last: #include <iostream> #include <vector> #include <algorithm> using name... (by lastchance)
Min cost, traveling group.
 
Hello, I'm trying to find the minimum cost of a travelling group. N students are put in a queue in front of a lift Each seat of the lift could be used by a sin...
[1 reply] : Your opt() seems to be using 1-based arrays, and your main starts (cor... (by salem c)
Code not running past nested if to else
 
Hello, I've made a nested If statement to validate game piece movement. I've confirmed the nested ifs by themselves work perfectly, but I'm also trying to make ...
[3 replies] Last: I find lots of disagreement with Linus Torvalds, though one can't argu... (by Niccolo)
C++ Program using function overloading
 
Question: Write a C++ Program to find the sum of either all the elements of the array or sum of the even elements of the array or the odd elements of the array ...
[6 replies] Last: Thanks ne555 & lastchance for your inputs. They were very helpful. Aft... (by sanjivraje)
PLZ HELP EASY PSEUDOCODE
 
This is my second assignment and it is way more confusing i have a few different ideas on possible pseudocode. ANY FEEDBACK HELPS!!!! THANKS QUESTION : Calcu...
[4 replies] Last: That looks right to me, but for a). Now, you need one for b) (by Niccolo)
Linear Search using a class
 
So I am running into a problem in which I want to use a constructor to initialize my member variable array as soon as I define an object of the class. However, ...
[4 replies] Last: Yes. It seems i added the data type int again when I should't have. Th... (by SilentXwing)
sorting two-dimensions
 
how to sort two dimensional array of c-strings? say we have the following variables: char strings ; int number where user inputs random words (200 ...
[5 replies] Last: @gongong, if you compare using strcmp() then you will need only one ... (by anup30)
by kenken
Seeking advice on rational number class
 
Hello guys. I am trying to define a rational number class. I've written part of the class in the following code but the code seems hard to follow. I looking for...
[5 replies] Last: Suggestions: The denominator should never be negative: simplify() sho... (by Duthomhas)
Creating a 3D vector
 
Hello everyone, I am fairly new at C++ and I need some help with multidimesional vectors. I am reading data from files that have the data stored in 3 columns...
[3 replies] Last: No problem. You’ll discover that the more you program, the more “A... (by Duthomhas)
June 2019 Pages: 1... 910111213
  Archived months: [may2019] [jul2019]

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