Beginners - April 2014 (Page 26)

Templated classes
 
//Hello! How can I declare (and create) correctly a pointer to a templated class? //And how to declare a pointer to various objects? main.cpp template <clas...
[18 replies] Last: I am not asking the same thing again and again, if I ask things simila... (by closed account jvqpDjzh)
by Mido14
Array Fill (what's wrong with this code)
 
Write a program that reads a number T and fill a vector N with the numbers from 0 to T-1 repeated times, like as the example below. Input The input conta...
[2 replies] Last: you're supposed to use a vector http://www.cplusplus.com/reference/ve... (by rich1)
Reusable Function
 
Hi Friends! I have completed my project just can not find a way to reduce my code, especially i could not made a function seperately to open file and reuse the...
[2 replies] Last: Hi ! I have fixed all the error and requirement but it is not properl... (by menewbie)
Stack overflow errors
 
I write code to read information from a file to an array, but I have a problem :Stack overflow errors. Here is my code: file "predefine.h" #ifndef ...
[4 replies] Last: thank you, thanks so much :D :D :D (by bathach95)
date validation if statment not working
 
I've gone in and with debug, checked each of the values, everything seems right, but no matter what I put in, the if statement kicks the entry out as being inva...
[2 replies] Last: doesn't give the time the program is run? wow... good thing I was able... (by incongruentbalance)
Playing 2 different frequencies
 
Does anybody know how to generate a .WAV file comprising of 2 seperate frequencies of a defined sample rate in C++? How can i get this code to ask for 2 freque...
[7 replies] Last: Perhaps something like this. Note this is untested as I don't have "dp... (by Chervil)
Trouble with XOR
 
So here's my attempt at xoring some data. The heap gets corrupted when XOR is called. void XOR(char*& data, char*& key, unsigned int datalength, unsigned in...
[3 replies] Last: Thank you cire. How did I not notice that.. (by DrZoidberg)
Input checking
 
Question: Hi I am wondering how should I make my input only get into the first if statement only if a alpha character is put in and nothing else, but if it is a...
[1 reply] : you are possibly looking for a structure like this if (true) { // d... (by CodeGoggles)
Does #include cost anything?
 
If I #include a header but use NOTHING from/in it, will the program slow down a lil' bit or will the size of the program file enlarge?
[6 replies] Last: OK. Thanks (by dleanjeanz)
Counting number of letters in array (1,2)
 
So I need to write a function called duplicate to find the number of times a user entered a given string within the bounds they gave. For example: Ente...
[21 replies] Last: We can go round all day with semantics. My Final point being I believe... (by CodeGoggles)
output stuck in option 3?
 
Hi, I'm writing a program that's just about finished, but I can't seem to get the right output. There are 5 possible choices, and I wrote then out in an if, els...
[5 replies] Last: You are welcome. Please mark thread as solved so helpers know if there... (by CodeGoggles)
Class / Member problem
 
if i make a class with private variables and i make public member functions to populate those private variables, can i populate the variable and return the vari...
[4 replies] Last: thanks, yeah i prefer it too it's just my final project has to be less... (by Engineer1990)
Graph representation
 
Hello, I need to do a graph represtation using adjacency matrix. So I am working with two classes, Graph and Vertex. class Graph{ private: Vertex* vA...
[no replies]
by Auroch
How to calculate a distance between points using vectors?
 
Hello, I have the following problem: Entering coordinates of points on a plain with keyboard (as rows x,y). Analysing this coordinates. Replacing coordinates i...
[13 replies] Last: Yes, algorithm is right but tools of your coding and coding of posts a... (by Auroch)
Help ASAP with initializing vector in constructor
 
How do I initialize a vector in constructor? I am getting error "debug assertion failed...Expressed vector subscript out of range" :( class Type{ ...
[4 replies] Last: Type::Type() : name(4, nullptr) {} http://www.cplusplus.com/referen... (by cire)
Mastermind
 
Hi guys. I'm trying to write a code for the Mastermind board game, and I've hit a snag. I've got close, but the problem is when there are more than 1 of a colo...
[4 replies] Last: Hey we could have a fun mastermind creation party! Here's mine! #in... (by ultifinitus)
Input validation problems
 
Payroll program: input pay rate/hours worked validate input so pay rate is in range of $7.50 - $18.25 and hours 0-40 display employees gross pay ...
[10 replies] Last: squirrel27 : I highly advise you not use those. They don't actually ... (by IWishIKnew)
Reading a matrix into a file, getting ascii values!?
 
Hi im writing a program for my c++ class and im having trouble reading a file and inputing into a twodimensional array. When i run the program, it gives me its ...
[2 replies] Last: answers for char "digit" character conversion : http://stackoverflow.... (by CodeGoggles)
Github Question
 
Hello, I have been required to use github for my class. I enjoy it and have even learned a lot of the command prompt. Tonight I accidentally deleted a fi...
[no replies]
by km2594
Want immediate help, please!
 
I am not able to compare two strings. Please help. The password part. My aim is i give a default password say, 12345678; i then ask the user to enter the passw...
[1 reply] : You're doin' the hardest way. bool welcome(string pass) { string... (by iQChange)
April 2014 Pages: 1... 2425262728... 67
  Archived months: [mar2014] [may2014]

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