Beginners - March 2018 (Page 2)

files are damaged after being downloaded from an ftp server through sockets
 
I send the command RETR and the name of the file I want to download. This file is downloaded into a buffer. After It's done I create a file with the same file e...
[3 replies] Last: all modern software is coded to handle the minor differences in text f... (by jonnin)
Function that prints the frequency of all words that appear in two given texts?
 
Hi. I need to create a function that prints the frequency of all words from two given texts. I must do this using mainly POINTERS. I already have the first part...
[12 replies] Last: So how exactly would I iterate through words using pointers? You did... (by Thomas1965)
double space:
 
#include <iostream> using namespace std; #include <string> int main () { int a; int b; int c; a = 100; b = 10; c = 310; a++; // one is ad...
[1 reply] : You should use [ code ] [ /code ] tags (without spaces) around your ... (by icy1)
by JayGln
gas pump
 
Hello, I'm learning about classes and structs. I have to write a program that will take in how much someone is going to pay for gas and display the iteration of...
[5 replies] Last: Just keep it simple to start with. Public methods of a class are the ... (by icy1)
incompatible types in assignment of 'int' to 'int [7]'
 
I am getting an error message "incompatible types in assignment of 'int' to 'int ' on lines 49 & 52 Here is my whole code, writing a battleship game that's to...
[12 replies] Last: const tells the compiler you, the programmer, won't be trying to cha... (by closed account E0p9LyTq)
c++ transformation from for to while and do while loop
 
So I was supposed to make a program that can calculate the total average of the amount of grades they wish to calculate. The program below works fine. The only ...
[4 replies] Last: make a program that can calculate the total average of the amount of ... (by closed account E0p9LyTq)
c++ yes/no do while loop
 
Okay, so I'm trying to make a program that can display an arithmetic options menu that simulates a simple calculator and make the cycle continue until the user ...
[4 replies] Last: Two unrelated suggestions: 1. Indent your code to match the actual blo... (by dhayden)
C++ annual budget of hospital
 
So I got this homework and I've been trying to crack it. I know what I need to do, but I don't know how. help plz In a hospital, there are 3 areas: General M...
[4 replies] Last: Thanx (by DigiLei)
Trouble with array doubling.
 
error showed in terminal: Segmentation fault: 11. Wanna double size the array when the array set before becomes full. But errors come up. Plz help me resolve...
[2 replies] Last: You did almost everything wrong. 1. You declared the jobs array as a ... (by tpb)
Need help to understand the error messege
 
compiling the code I got the following errors #include <iostream> using namespace std; class a { protected: int a=5; public: a(){cout<<"a c"<<en...
[3 replies] Last: Thanks a lot ,both Andy and repeater.This helped me a lot (by samir1996)
feel defeated (1,2)
 
Hey people I have to get something off my chest,I must say lately I am starting to feel defeated,first off I love programming,I love computers and the main thin...
[30 replies] Last: Ooh thanks. But first I gotta get that SSD. Only 8 gigs left on the la... (by zaphraud)
strange output with c style strings
 
Hey guys I know it's better to use std::string and all that but I am messing around and noticed a string bug in my code, as you see when I print e I was expe...
[2 replies] Last: And by the way char *p and char *c should be const qualified variables... (by jlb)
by stav
cin.get counts newline as character?
 
Hi, I have the following code: char option; while(option != 'q') { std::cout << "enter option: \n"; std::cin.get(option); std::cout << '\n'; } when...
[7 replies] Last: Now I looked up for this topic, and I found at "http://en.cppreference... (by nuderobmonkey)
Critique and Optimize my code?
 
Hello! I just wanted some feedback on my code, and maybe some ways I could make it better. The prompt was to create a program that did the following things: ...
[1 reply] : 35 and 11 should only appear once in the code, assigned to variables, ... (by icy1)
Outputting words with same information from a text file
 
I have to write a program where I input a word such as "BANANA" and it will read from a text file(this is a modified version of what i am actually working on...
[4 replies] Last: should be fully working now at the same link, https://repl.it/repls/Ug... (by icy1)
Why does a loop like this produce an infinite number of 2s?
 
int main() { int y ; for (int j=0; j<=10; j++) { y =2; cout << y ; } } If I remove the '=' it produces the desire...
[1 reply] : Your code overwrites y , which does not exist. It is not part of the... (by Repeater)
Need help debugging logic errors and booleans.
 
Having trouble figuring out why the boolean is staying true and why the functions are running even if they are not supposed to run. Any help would be appreciate...
[2 replies] Last: In getBoolean you're using = (the assignment operator) where you mean ... (by tpb)
by lsam18
Max and Min numbers goes wrong
 
Can anyone help on why my max and min numbers are wroing thx #include <stdio.h> int main() { int n, i; float num , sum = 0.0, average; float mi...
[6 replies] Last: perhaps try C++ ! Much more fun than C, I assure you C++ is more fun... (by Thomas1965)
Outputting information from a text file
 
Hi, I want to write a program where it will read from text file and output something based on the input. I just need help in what I need to know or do to write ...
[3 replies] Last: thanks i managed to modify the program and use it how i want it, but i... (by badatcoding67)
Homework Problem: I do not understand how to "define" functions
 
I need help with writing definitions for the 4 functions. I have no idea what I am doing wrong. I believe my mistake may have been somewhere in step 1 but I am ...
[7 replies] Last: indentation is all over the place, but otherwise it's a well-organized... (by icy1)
March 2018 Pages: 1234... 29
  Archived months: [feb2018] [apr2018]

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