Forum: C Feb 9th, 2009 |
| Replies: 13 Views: 1,997 Also it should be int main and return 0 :)
Chris |
Forum: Python Feb 8th, 2009 |
| Replies: 4 Views: 4,481 Should be noted that this can be prevent by doing the following print "Hello World",Yup a trailing ','
:)
Chris |
Forum: C++ Feb 8th, 2009 |
| Replies: 3 Views: 233 #include<iostream>
using namespace std;
int main(int argc, char** argv){
int num, i;
char** a;
cout<< "how many strings? "; |
Forum: C++ Feb 5th, 2009 |
| Replies: 4 Views: 303 encryptedLine += (line.at(pos) + password.at(pos2));
if (pos2 > password.size()) {
pos2 = 0;
}You try to retreive the value at pos2 when pos2 is > than password.size() before you reset pos2 to... |
Forum: C++ Feb 4th, 2009 |
| Replies: 2 Views: 312 A) We do not do work for you.
B) Do not use "Fakse" Signatures
C) Do not advertise
D) Read the forum rules
E) Come back after doing these with a code attempt.
Chris |
Forum: C Feb 4th, 2009 |
| Replies: 4 Views: 1,224 void *malloc ( size_t size );This is the function prototype, and as Agni stated it returns a void pointer. Since this is the function prototype you do not use this syntax when calling the function... |
Forum: C++ Feb 4th, 2009 |
| Replies: 11 Views: 888 if(!inClientFile)Please do not use this method, it is so wrong. You would be better using the followingif(!inClientFile.good())Chris |
Forum: C++ Feb 2nd, 2009 |
| Replies: 6 Views: 302 Read the forum rules, read a C++ book, read previous threads, just read something!
Chris |
Forum: C Jan 30th, 2009 |
| Replies: 12 Views: 1,701 Please don't PM code solutions. I suggest re-reading the forums rules too. Just to make sure you understand how we work when it comes to handing out code.
Secondly, code solutions are best in the... |
Forum: C++ Jan 29th, 2009 |
| Replies: 22 Views: 1,046 So replace ".World" with ".Earth"
??
Chris |
Forum: C++ Jan 28th, 2009 |
| Replies: 4 Views: 277 Sounds like you actually want something like this....#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <vector>
using namespace std;
int main(int argc,... |
Forum: C++ Jan 19th, 2009 |
| Replies: 4 Views: 2,113 So if(result > 99999) return 0;
*mumbles about multiple exit points*
Chris |
Forum: C++ Jan 19th, 2009 |
| Replies: 9 Views: 1,302 It should be noted that using ifstream with >> operator defaults to skipping whitespace characters, which '\n' is also included in. if you want to proccess the'\n' in a special manner then you should... |
Forum: C++ Jan 19th, 2009 |
| Replies: 5 Views: 429 Guess what, there's only one person at this forum who is capable of getting the answer and thats YOU!
Chris |
Forum: C++ Jan 18th, 2009 |
| Replies: 3 Views: 277 zalezog please don't add cin.get() to the end of people code snippets, they are not wrong by not using it. I would be more inclined to say you are wrong in using it.
Chris |
Forum: C++ Jan 16th, 2009 |
| Replies: 7 Views: 2,438 #include <iostream>
#include <windows.h>
using namespace std;
int main(void){
bool updown = false;
while(1){
if(!updown){
for(int x = 0; x < 100; x++){ |
Forum: C++ Jan 16th, 2009 |
| Replies: 2 Views: 211 Have (http://www.catb.org/~esr/faqs/smart-questions.html) a (http://www.daniweb.com/forums/announcement8-2.html) nice (http://www.daniweb.com/forums/announcement8-3.html) day!... |
Forum: C++ Jan 5th, 2009 |
| Replies: 8 Views: 1,343 can you not see the () on open? Its just you have two parameters inbetween them :P
You will need to escape that '\' characters
"C:\\programs\\fileneedschanges"
Then t shold work fine
Chris |
Forum: C++ Jan 3rd, 2009 |
| Replies: 5 Views: 342 |
Forum: C++ Jan 3rd, 2009 |
| Replies: 11 Views: 575 thats the function prototype, it shows that the function has a return type of HWND andtakes two parameters. A HWND and an UINT. msdn then explains what each of the parameters are, it also lists all... |
Forum: C++ Jan 2nd, 2009 |
| Replies: 7 Views: 407 Well if you store all the information into a map, then could just call the map by the name...
http://www.cplusplus.com/reference/stl/map/
Chris |
Forum: C++ Jan 1st, 2009 |
| Replies: 6 Views: 657 I think your going to have to give more detail here...Are you using MFC? If so then a password box will automatically do this....
Again we really need more information
Chris |
Forum: C++ Jan 1st, 2009 |
| Replies: 10 Views: 1,339 You need to pass the ctrl key press with the KEYEVENTF_KEYUP flag. That way it wont *stick* so to speak.
I guess blocking input might be a bad idea since then you have no way of using the ctrl... |
Forum: C++ Dec 30th, 2008 |
| Replies: 9 Views: 566 Follow MosaicFuneral's Advice. the reason your program is terminating is due to the fact you have a vector of type string and you are trying to push an integer into it, see the problem?
Chris |
Forum: C++ Dec 20th, 2008 |
| Replies: 3 Views: 388 I think your missing the point. YOU haven't done ANY work....why the hell should we!
Chris |
Forum: C++ Dec 17th, 2008 |
| Replies: 4 Views: 378 Please use code tags. These a thread related to them infact there all over the place!
Chris |
Forum: C++ Dec 14th, 2008 |
| Replies: 6 Views: 551 Not gonna happen this is not your homework solution lounge.
It's a guidance forum!
Chris |
Forum: C++ Dec 11th, 2008 |
| Replies: 2 Views: 236 Rather than me explaining it, i'll give you something to look at and think about. try adding the following line into your code, just inside the second foor loop
cout << "D: " << d << " B: " << b <<... |
Forum: C++ Dec 11th, 2008 |
| Replies: 11 Views: 827 please use code tags, and avoid red text many people will be repelled by it!
define IS_STRING 1
define IS_CHARACTER 2
define IS_INTEGER 3
define IS_FLOAT 4
This is to make a it easy for you to... |
Forum: C++ Dec 11th, 2008 |
| Replies: 14 Views: 2,676 My advice, do not use eof() it's counter productive. Instead do this.
while(getline(file, someString)){
//yourcode
}
Chris |
Forum: C++ Dec 7th, 2008 |
| Replies: 5 Views: 409 You need to look into operators,
You may find this useful
http://www.cs.caltech.edu/courses/cs11/material/cpp/donnie/cpp-ops.html
Chris |
Forum: C++ Dec 7th, 2008 |
| Replies: 6 Views: 535 Indeed, this statement is like a an if statment its equivelent would look something like this.
string myIF(int a){
if(a > 0){
return ", ";
}else{
return " ";
}
} |
Forum: C++ Dec 6th, 2008 |
| Replies: 2 Views: 441 http://www.catb.org/~esr/faqs/smart-questions.html |
Forum: C++ Dec 6th, 2008 |
| Replies: 11 Views: 771 Thats because the stack will be empty so you need to check stack.isEmptyStack(), if its empty break out because its unbalanced, if its not empty continue on and check.
Chris |
Forum: C++ Dec 3rd, 2008 |
| Replies: 7 Views: 552 I'm not too sure (http://www.letmegooglethatforyou.com/?q=Bottom-Up+Merge+Sort)
Chris |
Forum: Python Dec 1st, 2008 |
| Replies: 7 Views: 555 Hmm thats odd. I did think about the SendKeys module but i wasn't sure if you wanted to use it or not.
Addressing your other issue, did you try using... |
Forum: C++ Nov 27th, 2008 |
| Replies: 6 Views: 699 As an extention to this assumption, i want to add the following. Indeed the ascii Value '1' has the numerical value 49. Thus we are given a way to convert a character to its numerical value, by... |
Forum: C++ Nov 1st, 2008 |
| Replies: 2 Views: 507 Read the file line by line, split it into tokens based on spaces, then convert the number token into a double from a string.
You may want to look at.
getline()
strtok()
strtod()
Hope that... |
Forum: C++ Oct 22nd, 2008 |
| Replies: 2 Views: 421 No there isn't and again no.
You would have to write your own. Search the forums its a VERY popular question.
It will turn up alot of material for you to look at, including recursive and... |
Forum: C++ Oct 22nd, 2008 |
| Replies: 3 Views: 398 Just to summerise incase you don't bother reading, which wouldn't supprise me.
1) We do NOT do homework
2) We WILL help if YOU provide proof of attempts
3) Show where you are stuck
4) Provide... |