- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 4
- Upvoting Members
- 5
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
36 Posted Topics
hello, i started programming again after a while and i made this just to pass time/relearn the basics and stuff there is a weird issue that i can't figure out, when i input row 0 column 2 or row 1 column 2 it will fill the spot for both the … | |
Re: hi, use code tags [code]for (int j=i+1; j<6; j++)[/code] i is undefined in this line | |
Re: [url]http://dev.mysql.com/doc/refman/5.0/en/c.html[/url] [url]http://dev.mysql.com/downloads/connector/[/url] | |
Re: your question is way too vague, but maybe this: [url]http://www.cplusplus.com/reference/clibrary/cstdio/printf/[/url] my guess is you need to alter your precision for outputting | |
Re: in your createNewBox() function you have a parameter name then you try to redefine it with a box datatype instead, your function should be datatype box and return the new box, or add a box &b parameter and set that variable as the output box | |
Re: [url]http://www.cplusplus.com/reference/clibrary/ctime/[/url] | |
Re: [url]http://www.cplusplus.com/doc/tutorial/variables/[/url] float and double should be fine, if it's not working them my guess is %d is the wrong specifier, but i'm not sure | |
Re: i don't know anything about the actual "ignoring" process of it but you may want another check that checks if shift is being held down while vk_capital is [code]if( GetAsyncKeyState( VK_CAPITAL ) && !GetAsyncKeyState( VK_SHIFT ) ) { //ignore key code here }[/code] i also am not sure if getasynckeystate() … | |
Re: when i is equal to zero you are doing i-1 which i'm assuming is causing the error because fullname[-1] is out of range | |
Re: what's the problem? i'm guessing it's compiler errors since your gcd equation looks fine and i see some syntax errors on lines 25 and 37, your if/while statements shouldn't have semicolons here's some examples if needed: [url]http://www.cplusplus.com/doc/tutorial/control/[/url] | |
Re: [url]http://www.gillius.org/ctut/app_a.htm[/url] you only need escape characters for a few specific characters because these characters are also key characters for the compiler an underscore would just be mystring = "_" | |
hi, im getting this error: [quote]Unhandled exception at 0x00c11005 in bnetconnection.exe: 0xC0000005: Access violation reading locaiton 0x00c11005[/quote] in this particular instance, what i got from the debugger is that 0x00c11005 is my _ProcessCommands function dll: [code]#include <iostream> using namespace std; extern "C" _declspec(dllexport) void ProcessCommands( const char*, const char*, const … | |
Re: str.size() is fine, and recommended you create an integer (or size_t) 'max' (or whatever) and check if the current line's size is > than max and if it is store the new size as max: [code] size_t max; if( max < str.size( ) ) max = str.size( );[/code] | |
Re: you are not defining a value for substring, so it won't ever be found in the bigstring line nor are values defined for longest, secondlongest or third longest also you should use cin.get() instead of getch() i don't really see the purpose or understand the usage of the substring variable … | |
Re: i'm not familiar with the format of uva programs but perhaps your input method doesn't meet the standards of the grader? sorry i can't help more | |
Re: i don't really understand the question, if you're asking how to output an array via stream (or anything i suppose) then you need to make a loop for each element something i noticed: lines 11 / 22 are unnecessary because strings have a c_str() member which returns const char* | |
Re: use [code] tags, what's the problem? at first glance i don't see why you set c and a inside of the loop when their values never change, and you never define i, which is probably why your answer is not as expected | |
hi i am trying to explicitly link a dll to my console application however LoadLibrary() keeps returning with error 126: the specified module could not be found the file is in the same folder as the exe, and i've tried moving it to system32 and it's the same error, so … | |
hello i have made a program that connects to multiple servers and handles packets from multiple platforms (ie irc and some others) what i want to do is make a plugin system that will use my original program for connection purpose then have the plugin system be something like that … | |
Re: it doesn't seem like you understand the string class so here's a link: [url]http://www.cplusplus.com/reference/string/string/[/url] take note of size(), push_back() and the operators and as stated, i would create a temp string, read/copy the original then return the temp | |
Re: i would create a while loop that gets input and loops until there's a valid input, and clear screen/reprint if it's not then once you have valid input store it into the array then cls/reprint again for checking for a winner maybe you could do something that counts all of … | |
Re: you call getline() again to get the next line(s) | |
Re: no time to look at the function right now, so sorry if you wanted feedback on that but this worked fine for me: [code]string str="123456$654321"; int pos; pos = str.find('$'); int len = (pos * 2) + 1; if(len != str.size()) { cout << "error" return 0; } for(int i … | |
Re: i think you can define the count array as 0 and then make a loop that displays every element of count with a value > 0 | |
Re: i think something like this would work: [code]for(size_t i = 0; i < word.size(); i++) { for(int j = 0; j < 26; j++) { if(word[i] == alphabet[j]) word.replace(i, leet[j].size(), leet[j]); } }[/code] [url]http://www.cplusplus.com/reference/string/string/replace/[/url] | |
Re: oops, didn't realize this had 3 pages | |
Re: file input/output: [url]http://www.cplusplus.com/doc/tutorial/files/[/url] string manipulation: [url]http://www.cplusplus.com/reference/string/string/[/url] i would make a while loop that goes to end of file and looks for the start/end of each job and parse each line to get the info you need, then store it to variables then output later | |
Re: it's not finding the header file if it's in the same directory as your source try using quotes ("") instead of <> | |
Re: the function takes two arguments, not one [url]http://www.cplusplus.com/reference/clibrary/ctime/difftime/[/url] you need something to compare it to | |
Re: line 9 of sodoku.cpp is waiting for your input 81 times | |
Re: why not use a vector? it has functions for every objective so you don't have to remake everything when storing the vector you can probably do something like this: [code]for(size_type i=0; i < myvector.size(); i++) { if(insertednumber == myvector[i]) break; if(i == myvector.size()-1) myvector.push_back(insertednumber) }[/code] as for your current code's … | |
Re: [url]http://msdn.microsoft.com/en-us/library/ms738545%28v=VS.85%29.aspx[/url] [url]http://msdn.microsoft.com/en-us/library/bb530741(v=VS.85).aspx[/url] [url]http://msdn.microsoft.com/en-us/library/ms737612(v=VS.85).aspx[/url] [url]http://msdn.microsoft.com/en-us/library/ms740149%28VS.85%29.aspx[/url] [url]http://msdn.microsoft.com/en-us/library/ms740121%28VS.85%29.aspx[/url] assuming you don't need something portable (and you're on windows), winsocks will work, otherwise there are more portable methods if needed | |
Re: i think something like this would work: [code]int nIndex = 0; int nSize = sizeof(num)/sizeof(int); while(nIndex < nSize) { int rndNumber = rand()%10; for(int i = 0; i < nSize; i++) { if(num[i] == rndNumber) break; if(i == nSize-1) num[nIndex++] = rndNumber; } } [/code] | |
hello i am still fairly new to network programming and have been reading up on it but can't find any solid examples for what i'm looking for my goal is to make a bot that connects to a server via the battle.net protocol, and part of it involves parsing data … | |
The End.