Beginners - May 2017

Big O of a function with a function that has not been implemented
 
Hi, I have a function that I need to find the Big O of, and have already written my notes down, but am not sure whether or not my answer is correct. So what ...
[4 replies] Last: The formal answer is either O(N log(N)) or O(N log(N) + N) Since... (by mbozzi)
by Faggio
cast template
 
Is it possible to cast a string to a template? x= (T) y; where T is my template type, y is a string and x is of type T.
[3 replies] Last: stringstream? Or have I (as is quite likely) got completely the wrong ... (by lastchance)
by zspar
Chained hash table Insert function
 
Hello, I was assigned to create a chained hash table using a vector of vectors. It is designed to hold objects of type Entry. I have written all of the function...
[6 replies] Last: Line 101: you leave num_entries uninitialized Line 110: you set num_e... (by dhayden)
How to make and copy a project in CodeBlocks?
 
I have two related questions. I normally use Code Blocks for C++ programming. Now, I have a collection of files C++ that I downloaded from a book. I want to...
[5 replies] Last: Thanks jlb, but I'm afraid I didn't understand much of your explanatio... (by Claudius7)
Error
 
Why Its Not Compiling #include <iostream> #include <string> #include <cstdlib> using namespace std; void square(double); int main() { double num;...
[2 replies] Last: Got It Thanks (by Najam489)
How to print inputted char array seperately
 
Hello fellow C++ learners! I'm very new to this Array concept and I'm having trouble with doing a certain task I made up for myself. The QUESTION IS: INPU...
[6 replies] Last: if you are learning, get away from character array strings as fast as ... (by jonnin)
by RezaAb
splitting a CSV file to different columns
 
Hey guys, I have a CSV file including double values in two columns, and I want to split the file and copy each column into a vector. For example: A.csv :...
[2 replies] Last: Yes, you are right. I solved it, thanks! :) (by RezaAb)
How do I list the ABC's vertically using counter control loop?
 
#include <iostream> using namespace std; int main() { char letter; for(letter = 'A'; letter <= 'Z'; letter++) cout << letter; return...
[7 replies] Last: an alternative version using the OP for loop: # include <iostream> ... (by gunnerfunner)
Starting Attempt at Menu with Win / Loss Results
 
Hello, So essentially I am taking the knowledge I have acquired so far to put together a small game for a homework assignment. My goal is to give the player ...
[2 replies] Last: for a homework assignment. Does it means you do not want the soluti... (by Enoizat)
by mmgh
gprof on Mac
 
hello everyone! I have a problem in profiling my code on Mac as it does not support gprof. My code is part of a big package which prints out gmon.out and...
[no replies]
Websites
 
Can you make websites with C++? If so, how do i get started?
[2 replies] Last: Take a look here: https://www.webtoolkit.eu/wt (by coder777)
c++ help with implementing binary search tree functions
 
I have been given binary search tree code by my professor and I need to implement "int smallest_key()" and "int largest_key()" functions. I am not allowed to "b...
[2 replies] Last: thanks TheIdeasMan, slogging away at it, it's getting there (by kielbasa)
cin with multiple words
 
First off sorry im sure thas has been asked lots. I cannot for the life of me get cin to recognize my words, ive been at this for hours Im really stumped. The p...
[2 replies] Last: Thank you my man! (by MoreUmph)
by Grobeg
How to sort books?
 
Can anyone write a code in C++ for sorting books? There need to be textual file next to the program, with for example...: Author1 1990 Bookname1 15 Autho...
[1 reply] : This is not a homework site. We won't do your homework for you. Howeve... (by chicofeo)
this code is running but not giving me the correct value of standard deviation and mode where might i have gone wrong?
 
#pragma once #include "stdafx.h" #include <iostream> #include <iomanip> #include <cmath> #include <fstream> using namespace std; int main() { //declare an ar...
[10 replies] Last: now it is running but once i enter the values in the console for outpu... (by lubzy95)
General directions
 
Hi. Im new to C++ and id like some directions to what id need to learn to write a program that can take several audio files and an image and converter the audio...
[3 replies] Last: Yes. The manual is here: https://ffmpeg.org/documentation.html (by mbozzi)
by EERD
random number
 
Im planing to make a simple game without classes (backgammon) i need some functions that give me opportunity to get 2 random numbers for Dice here we need for l...
[2 replies] Last: thank u (by EERD)
by Faggio
how to save a whole sentence
 
I have this kind of file: 1 hello 2 hello world 3 hello my world I read this file with getline(file, line) to save, with the use of stringstream, nu...
[4 replies] Last: If the leading spaces are a problem, you can also add something like t... (by Enoizat)
Interest Rate Calculator
 
I have a defective compound interest rate calculator: it gives out incorrect results. Now, I need to maintain the existing function types without adding anythin...
[no replies]
Reading a file and splitting lines into commas then push back into vector.
 
// I want to read from a file and split each line by comma // after splitting push those words into a vector and then display vector. // I tried this code below...
[6 replies] Last: I finally figure it out. Thanks everyone for your time. #include <i... (by Hamidur)
May 2017 Pages: 123... 24
  Archived months: [apr2017] [jun2017]

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