Beginners - February 2014 (Page 36)

Counting all printable characters found in a txt file
 
I'm writing a program that reads and counts all the printable characters (ASCII 32-126)found in a text file. For example if the text file read: Why so serious?...
[1 reply] : When first encounted, i has an indeterminate value on line 26. It i... (by cire)
Problem with returning strings
 
Hey guys, what exactly have I done wrong here? I'm trying to return a string from a function to concatenate onto my question but it fails to display the questio...
[2 replies] Last: Holy S**t I'm blind. cout << question; Thanks man. Haha. ... (by Sausage)
Reading/Displaying Binary Files
 
So I have a code that's supposed to read, write, and display a binary file. The writing part of it is good, but I'm really lost on what I need to get the displa...
[1 reply] : The writing part of it is not okay. You don't want to write a point... (by cire)
C/C++ Enter INPUT without ENTER
 
Hi, i'm italian, and i create a small program which simulate a PIANO, i have a question, how can i enter a value without press everytime enter, ex: i make 5 not...
[3 replies] Last: http://www.cplusplus.com/forum/unices/122108/ (by closed account 3hM2Nwbp)
multi if staments
 
it out puts the else instead of else when i do "good" and "fine" the explanation is under // #include <iostream> #include <string> using namespace std; int...
[1 reply] : problem in last else, because this else is only for last if not for al... (by ak16)
for loop
 
I have to write a program that displays menu function where the user has to pick from then i have to put a loop in on one of the choices not sure how to do this...
[4 replies] Last: i fixed a little i hope i got this right. #include <iostream> #includ... (by Knightwing)
passing values from one function to another in class implementation file
 
Hello everyone we have an assignment due tonight which involved creating a class and using functions within it to display a giftwrap invoice. I have almost c...
[8 replies] Last: Yes that's correct NT3! practice will make perfect eventually! (by MajorGravy)
Reading whats in a file
 
So my program currently will read the first number in the text file, but if I accept, or replace the number. It will start randomly putting 0's in and it will ...
[4 replies] Last: Thank you Smac89, I will try that when I get home and post if I have f... (by cory244)
equals
 
the code doesn't recognize equals in if (ans.equals("good")) #include <iostream> #include <string> using namespace std; int main() { string ans; char nam...
[2 replies] Last: thanks soooooooooooooo much ive been trying this for ever i quit for a... (by kmtompkins)
Hot Drink Menu
 
Stuck in an endless loop, It builds perfectly and I cannot pinpoint what is wrong. // This program uses a do-while loop in a menu. #include <iostream> ...
[5 replies] Last: Just going to add an extra cent worth. It is good practice to declare... (by TheIdeasMan)
rename executable and all .o files when compiling using positioning flags
 
Hi! I have a working make file and want to change change the naming of the output and exectuables files. Unfortuneately, I not so familiar with make files, and...
[10 replies] Last: I'll explain. File GNUmakefile: First of all, GNU make looks for a m... (by kbw)
functions
 
alright i have this code now i have been asked to break it functions now iv been asked to break it down more which i don't what more i could do any suggestions ...
[4 replies] Last: alright i did all that and it works and he just wants to shorten it up... (by TheMikey87)
how do i get my program to print the text from file
 
I have to make this program input from a file "puzzle.txt" which contains the matrix size and word puzzle contents. For example the input would be: 5 8 h...
[4 replies] Last: The text will be in the format in which I said. It would be inputted ... (by bknick24)
by Ln206
Should i start with c++ next?
 
Hello all, First, i would like to say sorry for my English as i'm not a native speaker. Second and finally, i wanted to ask if i should start with c++ or c n...
[2 replies] Last: Thanks. I'll start with c++ first. I guess the most hard thing in pro... (by Ln206)
using strtok to parse c-strings
 
I have a coding assignment that provides an irregularly formatted input file (uneven number of spaces) and I'm supposed to use c-strings to separate and format ...
[1 reply] : Isn't cstring a bit outdated? In C++, I would use a string and just u... (by IWishIKnew)
data verification ruins whole program
 
So, given a task for a class we are told to gather user inputs for 4 test scores and a final exam score. I built in if/else statements that should check if the ...
[2 replies] Last: I appreciate your reply. As for asking the instructor about material n... (by Athecal)
Towers of Hanoi
 
code is giving me the error "no suitable conversion function from string to int exist" on Move(a, b) function. also im not sure if my tower moving is correct ...
[1 reply] : Hi @keyko18, //function header void Move(int e, string x, string y,... (by eyenrique)
Need Help--Getting the Apple mach-O linker Error
 
Hey everyone, Im new to the programming. Recently I've been practicing my coding following by watching Youtube video. I did exactly like the coding in the vid...
[5 replies] Last: It's not stupid. It human nature. (by kbw)
by zakkor
Reading data into vector, need some1 smarter than me to help
 
This code is taken off a bigger project, but essentially there's a vector of type Script (my class) called Scr, and when I try to read data from a .txt into it,...
[12 replies] Last: Oh hang on. This doesn't really help, though. I need the script object... (by zakkor)
Program won't work?
 
Hi! So, I'm a beginner, so I don't have the ability to identify the mistake I made. Can someone please tell me what I did wrong(Please use beginner language)? ...
[8 replies] Last: Thanks! Now it works! (by Uminious)
February 2014 Pages: 1... 3435363738... 60
  Archived months: [jan2014] [mar2014]

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