General C++ Programming (Page 4)

by cmisip
Template parameter with variadics and shared_ptr
How come the commented out code does not work?. I am trying to come up with a way to pass multiple ...
[15 replies] Last: I do a lot of ruminating when I am driving. It occurred to me that si... (by cmisip)
What's wrong with my code here? (Sieve of Eratosthenes)
Here is my code (the explanation for what I'm trying to do is all above main() in comments, so pleas...
[10 replies] Last: Wouldn't that be bad (for the names and scores one)? If we delete the... (by DragonOsman)
by bp04
Error in stdint.h
I include stdint.h in my header file, it shows error which says " , expected ". What is the issue? ...
[7 replies] Last: Thanks for the reply. In that case it looks like a problem with the c... (by Chervil)
Not enough arguements
// Description: This program calculates the average of a group of five test scores where the group i...
[4 replies] Last: double ix, iy, iz, iw, ib; Should be : double ix = 0, iy = 0, iz ... (by SakurasouBusters)
How do I print out the info from a class??
Hello everyone, I am basically creating a class called Person which holds member variables for a per...
[1 reply] : You could write an input taking function: void input_Person_data( ... (by nuderobmonkey)
cin problem
why the second cin didn't execute´╝č #include<iostream> #include<algorithm> #include<string> ...
[1 reply] : while (cin >> s) l.push_back(s); Should be : if (cin >> s) l.push... (by SakurasouBusters)
Anyone knows...??!!
So basically I was new in c++ Anyone know how to make string we input become like this: Ex: input...
[10 replies] Last: #include <iostream> #include <string> #include <vector> int main( )... (by integralfx)
Lowercase to uppercase using ASCII
Hi Here I'm trying to load a coded message from a text file to decode it using ASCII. I take the f...
[2 replies] Last: Your answer didn't help but I figured it out. Thanks anyway (by overlord49)
binary search function
I have never written or seen a binary search function before, so how would I write one using vectors...
[3 replies] Last: The defining characteristic of a binary search is that, each iteration... (by mbozzi)
Order form help:
Hi guys, I made a script that is suppose to be a customer order form. It works at the start but ...
[2 replies] Last: Thank you SakurasouBusters (500) code works. Noobish mistake, still ne... (by animation117)
Something wrong with my for loop?
I am writing a program where I need a for loop to run a certain amount of times, depending on user i...
[1 reply] : I compiled your function along with a simple main function and I think... (by wildblue)
by CZZ
Vectors problem
Hi guys! I need to find the minimum distance between two points. For instance, I have two files ...
[1 reply] : In other words, you do have two sets of points, A and B, and you want ... (by keskiverto)
scramble user input
would this code scramble a word? i keep getting errors and im not 100% sure why. unsigned int scr...
[2 replies] Last: yes i believe so (by jessicacats)
by nusr
Trouble with Matrix
I need make a code with this output with the cicle for . 1 2 4 8 16 2 4 8 16 32 3 6 12 24 48 4 8 16...
[3 replies] Last: Unexpected output, I presume. Math trivia: (f*2)*(c*2) == f*2*c*2 ==... (by keskiverto)
How to use endl after if statement
I'm trying to make a blank line after my if statement, but for some reason it isn't making a blank l...
[4 replies] Last: you can also try cout << " " << endl; (by linny0107)
binary search for word in dictionary
I need to search for a word in a file and return if its in the file or not, but i'm not sure how to ...
[no replies]
How can I make unordered_map to contain more types of objects (rectangle, triangle...)
As title says, how can I make my unordered_map to contain more types of classes like: Triangle, rect...
[7 replies] Last: Thank you very much. (by Putarda)
memory leak help
When I run valgrind on my code, I receive one error on my insert method at operator new. I know this...
[3 replies] Last: > but I have been trying so many methods to delete it but they just gi... (by ne555)
comparing files and strings
I have to open a file that lists all of the names in our class and compare it to a file of names ran...
[5 replies] Last: Yes, I can understand your frustration. One thing you could do is to... (by gunnerfunner)
i need a c++ program for the following problem
Write a c++ program that multiply the numbers. The program will receive multiplicand and multipli...
[6 replies] Last: [quote=integralfx]Maybe a "What have you tried so far?" would be bette... (by SakurasouBusters)
Pages: 123456... 38
  Archived months: [aug2016]

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