Beginners (Page 2)

Efficient Algorithm for subarray product
Can someone please Suggest an efficient algorithm O(nlogn) or O(n) for finding number of continuos s...
[5 replies] Last: Divide by 2 until the number is odd and that will tell you the power o... (by helios)
trying to define a friend function which add two matrix
Hello there! i am a beginner user of c++ i am trying to write a code which get two different matrix ...
[12 replies] Last: U is a reference to P3. That was created and scoped in main, so it i... (by jonnin)
Discount C++ program using a switch statement
Hello there, so basically im trying to do a small program that let the user enter a value then if th...
[7 replies] Last: #include <iostream> using namespace std; int main() { int trigger... (by lastchance)
Interest While Loops
I can't really pinpoint what's wrong here. This question asks how many years it would take for the ...
[3 replies] Last: It works, but there's a lot of duplicated code there. That needlessly... (by MikeyBoy)
Shortening and facilitating the creation of programs
I made a program that helps me learn german.I speak just serbian,that you should not confuse about t...
[3 replies] Last: Note that I made a mistake in my previous post. On line 13 it should r... (by helios)
by cirro
am having tough time to get the correct answere
i cant get this to giv right answer on the second else if .when i age is less than 18 and cash is mo...
[7 replies] Last: thanks it worked out i appreciate ur help (by cirro)
Using a while loop to check if a char exists in a string
How can I use a while loop to check if a specific char exists in a string? for example if my stri...
[2 replies] Last: Hello printfsalad, size_t index{}; while (index < name.size()) { ... (by Handy Andy)
Class Constructors And Initialization
Hello, I am trying to understand this code but I seem to be stuck. Hopefully you can help me und...
[2 replies] Last: these are obviously functions Do you mean this class: class server ... (by keskiverto)
Input and output, binary file
In this code i am not able to perform reading operation. In addition after writing data it itself as...
[1 reply] : Pay attention to the ... (by salem c)
Doubt in basic file handling
I wrote this code but not able to get desired result. It runs without any errors by compiler but end...
[4 replies] Last: Thanks a lot. (by sameer304)
Do while
Trying to work this example out of my textbook and don't understand why it functions correctly with ...
[5 replies] Last: Hello dakotad8218, I have tested the program in the shell and in VS 2... (by Handy Andy)
by kmce
Global objects?
Hi, I have a question regarding objects. I have 4 classes that, in my main file, I need to create ob...
[3 replies] Last: Ok I understand now why creating them as globals would be a bad idea. ... (by kmce)
Retrieve vector content for a special type
Hello, given I am saving content to a vector std::vector<IP> list, how can I retrieve all the conte...
[1 reply] : I don't know what an "IP" is. Is your class? Is it someone else's clas... (by helios)
by R0SsAN
Fastest way to import a text file
Hi, I'm writing a program that takes txt files as input and looks for strings in them. Until now I ...
[10 replies] Last: Hardware is getting to be amazing. I redid mine. If you run it as... (by jonnin)
Linked Link Assignment
I need help with this linked List assignment, Using an appropriate definition of ListNode, design...
[8 replies] Last: Manga's constructor mistakenly uses a local variable named head. I'm s... (by dhayden)
Some question about user input
I am currently working on my C++ assignment and i have a question The user of this program will i...
[2 replies] Last: if the text is only one line, the program can run smoothly. But if th... (by Enoizat)
Linked List Testing Problems
I am continuously getting an error while attempting to test a linked list with nodes that says "the ...
[11 replies] Last: No problem - glad it helped! It's an easy mistake to make :) (by MikeyBoy)
Binary Tree, function isn't reading in
I've got this program thats supose to translate morse code into the message. I am having a problem...
[7 replies] Last: > I have created many of functions that don't pass any parameters into... (by ne555)
İ writing password correctly but it s still says wrong
Hello everyone i need some help. There is a problem but i can not solve it #include <iostream>...
[3 replies] Last: Thank you so much. thanks to you i solved it. (by wanheda)
Stop Pointing
I am writing a helper function that is to be used by both a copy constructor and an overloaded assig...
[12 replies] Last: I got the function working. Thank you for the example, and everyone's ... (by stoneJax)
Pages: 1234... 16
  Archived months: [feb2020]

Cannot post in this page. To post a new message, go to the first page.