Hey guys. I want my program to output all the files, in a given folder, that contains a word entered by the user. What the program does, though, is simply output ALL the file names, even though it's...
Type: Posts; User: tilex
Hey guys. I want my program to output all the files, in a given folder, that contains a word entered by the user. What the program does, though, is simply output ALL the file names, even though it's...
Even simpler. PlaySound() can play .wav s... really tricky heh ?
Try to change get() to this:
std::istream& get(std::istream&);I think the OP only hid useless code which is the right thing to do. Oh and by the way, you should use iostream and not iostream.h and 0...
Thank you mates, I will try this ASAP.
1) You aren't even using any randomizing functions like rand()...
2) You shouldn't be using FILE as a variable name since it might make confusion with FILE in cstdio.
Read and ask questions until you aren't confused anymore...
It can't be the problem since my friend got the "Connected !" message on his screen but I didn't.
Edit: I made sure my program wasn't blocked by my firewall before trying.
Sorry, I'm not a native englophone (capital 'e' ?) so I often make mistakes that change the meaning of my words.
Try to make a basic calculator that will ask each number separately:
Output: What operation do you need ?
Input: +
Output: a ?
Input: 5
Output: b ?
Input: 6
Output: 11
I'm not.
The only case where it will not is if you type = 0 (false == 0).
Try inputting anything else than 20 and you will see.
I don't want to be mean but that was a pain to read. Please make a little effort to write at least complete words. And you are right, there is an extra set of curly brackets.
Actually, there is an error. In the if() statement, you need to change = to ==. In C++, = is an assignment operator therefore you will assign variable values with that operator. However, == is a...
Hi everyone ! I'm trying to make a console chat application but I have a problem. I tried the program with someone and that person managed to receive the "Connected !" message, but I didn't. We both...
Hey everyone. I'm trying to create a logger for my program so that I can find very easily where the bugs occurs, what functions fail... but the problem is that my logger is failing, wich is pretty...
How stupid am I, thank you mate.
Now it outputs 326 with the following code, why ?
template <class int_type>
inline char* itoa_t(std::string& buf, const int_type nb) {
buf += char(nb%10+'0');
for(int_type i=1; pow(10, i)<nb;...
Well nevermind, I just found out, but could anyone tell me why I get junk with the following code ? It output "½½"
#include <iostream>
#include <string>
#include <cmath>
#define VALIDATE(a)...
Hi everyone ! I was bored and decided to make my own version of itoa that would work for a std::string (since I work so often with it and always tell myself how how sad it is it wasn't yet overloaded...
Hey man, look at this...
#include <iostream>
#include <string>
int main(void) {
bool gendermale = true;
const unsigned int age = 14;
std::string filename = "";
filename +=...
using namespace std;That line is evil since it completely the std namespace's purpose that is protect the global namespace from name collision.
1) I don't understand your question:
2)
void clearscreen(const unsigned int num_lines) {
for(int i = 0; i < num_lines; ++i)
cout << endl;
}3) If you use the using... you don't need...
1) system("PAUSE") can be replaced by std::cin.get()
2) There are no standard functions to do that, you may want to create a function that will output a bunch of new line characters ('\n')
3)...
1) Remove every call to system()
2) Add std::cin.get() at the end of your program.
Can't help you much without code.