Beginners - February 2015 (Page 19)

Reading/writing in binary files
 
I'm a little confused about writing/reading in binary files, especially when it involves strings. // Wiz.h #ifndef WIZ_H #define WIZ_H #include <f...
[4 replies] Last: You're a lifesaver Konstantin2 :D The original code was actually in te... (by hornet07)
C++ How can i output all the items in this program
 
I am having trouble doing my homework assignment I am almost done but in that program I can not figure out how to output all of the users purchases. I dumb down...
[3 replies] Last: #include <vector> #include <string> using namespace std; str... (by AbstractionAnon)
Converting int to char
 
Hello I need to be able to convert an integer to a char. I've already tried several things but none worked. int a = 5; char file = "file" + a + ".txt"; remo...
[4 replies] Last: Thanks all! That worked out well. (by Nielyboyken)
binary operator overloading
 
I found the below piece of code on the internet.I need help regarding binary operator overloading.In the main funtion,,result=c1-c2;<-this statement has been wr...
[1 reply] : .I just wanted to know,,does this statement mean that the object c1 i... (by AbstractionAnon)
Escape Character
 
Hi, Should we write all escape characters in single quotes ? \' = single quote \v = vertical tab \? = '?' \ (octal number) and \x (hexadecimal number)...
[1 reply] : Only if you are writing a single character . If you are writing a st... (by Duthomhas)
2 Dimensional Arrays
 
Just have a question, why do I need to specify the size of a 2 dimensional array. Is there a way around it, I've tried using a pointer but still gives me an err...
[5 replies] Last: Thanks very much tipaye. Helped a lot. (by sourcedesigns)
Vector member data Error
 
Hello everyone, Could you please tell me why i got an error on this line vector<vector<double>> vectorCurve(1,vector<double>(2)) in the code below? My ...
[3 replies] Last: Oh great! thanks for the accurate answer! Regards (by JasBeckC)
Class implementation clarification
 
I'm somewhat confused about this code I have to work on so I'll just ask for someone to tell me what I did wrong so far. The class declaration is from the cours...
[10 replies] Last: Thanks for the spot Jaybob. After I changed the mSize to newSize, it l... (by hornet07)
Cannot change the value on the heap.
 
//I made this game. But the crucial part doesn't work. //The value of health doesn't decrease when the character is attacked. //I commented the places in the...
[8 replies] Last: @anup30, @fun2code, @Lorence30, @LB. The code works now. Thank you al... (by oligranaat)
Help with my code
 
Here is the code so far #include <iostream> #include <string> using namespace std; void welcomeMsg() { cout << "Welcome to My Program" << endl ...
[1 reply] : Q. Where did you store the data for each call? A. You didn't. You nee... (by keskiverto)
definition and declaration + initializing
 
I thought i understand this but I started to get confused by one question in the book "Why is it a good idea to initialize variables as they are declared?" ...
[2 replies] Last: Thanks a lot for answer :) (by etrusks)
Decorator Design Patterns Question
 
Hello everybody, I'm trying to implement a decorator design pattern in the code below. With this I get : Base model of Ferrari costs $31000. Unknown ...
[6 replies] Last: Thank you for the links, very useful! (by JasBeckC)
by Dkob1
void, display min. & max.
 
Hoe do I find min and max using void and display? #include <iostream> #include <iomanip> #include <string> using namespace std; int main() { ...
[8 replies] Last: May I suggest something more like this? #include<iostream> #include ... (by closed account D80DSL3A)
NEED URGENT HELP! ARRAY using If else Statement!
 
Can someone help me generate a code for my assignment in C++.? The instructions are here. I really need a help now. i need to pass it tomorrow. I need to cre...
[1 reply] : What do you have so far? This isn't a homework site. (by closed account 2UD8vCM9)
by sekmo
Command line arguments
 
Hello, my professor wants us to get the program to take in an ASCII value and convert it into binary and vice versa. But she wants us to take it in as a command...
[1 reply] : argc and argv are the command line arguments: #include <iostream> ... (by coder777)
Adding characters to a string from cmd line
 
Hey, I'm trying to start a code for a Viginiere cipher and I need help with my string. I've created two strings, one for the encoded message and one for the cod...
[1 reply] : I need to keep adding characters to the key string until it is the sa... (by coder777)
dynamic arrays
 
Hello everyone. Here my question is. I need to write a code using dynamic arrays. The function must get an array and return its even terms. But my code does no...
[4 replies] Last: Thanks (by The suffocated)
by QM168
If statement question
 
Use three separate if() statements for the tests (one for each possible hypotenuse). Remember if you don't find a right triangle in any of the three if() statem...
[7 replies] Last: What is the different between these statements? in the first one. ... (by xenovia12)
Calculator program
 
So I have to write a program that serves as a simple 4 function calculator. Looking up an example gave me the code I have below, but it won't build successfully...
[9 replies] Last: Have you tried deleting that line? That looks like an extra closing br... (by LB)
Help, function is skipping?
 
So I'm suppose to write a program that counts the number of upper case, lower case, words, and vowels in a sentence. And for the vowel count, I have to write it...
[2 replies] Last: I agree with fun2code. Glad I reloaded this page before responding! ... (by nickeeromo)
February 2015 Pages: 1... 1718192021... 52
  Archived months: [jan2015] [mar2015]

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