Beginners - March 2016 (Page 21)

I can't open my project
 
Here's my code. When I click "Build and run", it opened but it came up another window said the program has stopped working. #include <graphics.h> int ...
[no replies]
Console Application
 
What kind of console application that i can make with c++? My last console application is matrix multiplication. And does console application could perform only...
[3 replies] Last: Depending on the libraries you use and your creativity C++ can create ... (by closed account E0p9LyTq)
Search and replace program
 
I need to make a program that searches a file for every occurrence of a user determined word, and replace it with a new one. I wrote the following code: ...
[2 replies] Last: Thank you, now I see it! And you're probably right about it being over... (by diogogomes)
How to copy vector<string> to a string x
 
I looked up a lot of stackoverflow answers and I tired using like people suggested but I couldn't work it out. I want to avoid using ostream istringstream et...
[3 replies] Last: thanks @Chervil (by pagare)
Calculating the total and displaying the total.
 
Im having trouble calculating and displaying the totals of rainy, cloudy, and sunny. Can someone help me here? #include <iostream> #include <fstream> u...
[2 replies] Last: Without knowing the format of the input file, I can't comment on wheth... (by AbstractionAnon)
Loops - HELP!
 
Write a program that asks the user to input a positive number (declare an integer variable n). Your program should calculate the sum of the following alternatin...
[6 replies] Last: I made a slight revision to the above code to compute the term at line... (by AbstractionAnon)
by Bopaki
Error when compiling a program
 
Write your question here. When I compile an example program by Karlina Beringer I get 2 errors. C:\Martin\MalikChapter3\LinkedList.cpp In member function 'b...
[8 replies] Last: You are a star sylphsang!!!! It worked....... I have been stuck wit... (by Bopaki)
Interest rates giving far off numbers than expected
 
I am relatively new to C++, but I was wondering why I was getting off calculations in my interest equation. I need to display the interest acquired after 5 year...
[2 replies] Last: It has been producing numbers in the ten-thousands (33632) I am enter... (by cire)
by jeff14
Not outputting to file
 
Hi the code is suppose to output to file but the whole program crashes before it outputs anything. What is wrong with it? #include <iostream> #include ...
[3 replies] Last: In the input function are writing to the file while the same file is... (by Peter87)
by nofish
using a vector instead of an array
 
Hello, I have this delay class (it's for audio processing) using an array of doubles for a buffer. // MyDelay.h class MyDelay { public: MyDelay(); ~MyDel...
[4 replies] Last: Ah yes, of course. Marked as solved, thanks for the replies. :) (by nofish)
Output of change
 
My program reads what a user wants to buy if its the monitor a,b or c whenever i enter the amount of money it always ends up with money minus the price of the m...
[6 replies] Last: OHHHH THANK YOU VERY MUCH I GOT IT NOW ^_^ THANK YOU :)) (by itsmegon1999)
Nested for loop troubles
 
I've been given an assignment where I am to pull data from a .txt file. I was told to use a nested for loop within a for loop. I have it set up to the point whe...
[1 reply] : You get the nested loop wrong. The for loops need to be one after anot... (by coder777)
expected unqulified-id before delete!!
 
Write your question here. when i implement this code, the error(expected unqualified-id before "delete" expected ',' or ';' before "delete") is shown....
[3 replies] Last: To Peter87 Very very very very strawberry very Thanks!!!! I exchange ... (by coldbear59)
by hihihs
Inheritance of class
 
I try to learn inheritance by myself, however, I do not know where is the error in this code. I try to print: Rectangle: length = 8 width = 3 24 Squar...
[3 replies] Last: Shouldn't you also be initializing the variables to some default value... (by Peter87)
R1 is a reference bound to 1
 
ri is a reference bound to i so how come it prints 10, 10 ? int i, &ri = i; i = 5; ri = 10; std::cout << i << " " << ri << std::endl;
[3 replies] Last: See that & on the first line? That means ri is a reference to i .... (by Peter87)
using getline() to read from a file
 
I'm having a problem with the following code. I am using it to read from a file. In the file, there are 83 weather stations that report the name(which is separa...
[2 replies] Last: step through the debugger so you can follow the sequence. #include <... (by rafae11)
Pointer points to wrong memory location
 
When while and cin involved , this question becomes so vague to me . If I don't use cin or anything else here ,just new int and pointers , everything is fine ! ...
[3 replies] Last: this overloaded operator returns istream object , where is it... (by coder777)
Counting the number of binary comparisons
 
I have my code here that asks the user to input a four letter word and then takes the word and searches through a txt file of 4030 4 letter words to determine i...
[1 reply] : Where is the problem? What's wrong with line 39? By the way you can m... (by coder777)
Need help validation int
 
No matter i put the validation it will infinite loop when type word. Pls help do{ else if (choice == 5) { system("cls"); int c, c1; cout...
[2 replies] Last: Thx for the reply, now i have solve it. (by bryan1288)
i need help
 
Write a program that forms the one-dimensional size box 20, in which they are randomly mixed in the number from 1 to 20
[1 reply] : Please note that this is not a homework site. We won't do your homewor... (by keskiverto)
March 2016 Pages: 1... 1920212223... 47
  Archived months: [feb2016] [apr2016]

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