Are you allowed to use common APIs or libraries? For example make a full screen program that draws the circles as red in white background, capture a screenshot (from code), save screenshot in a...
Type: Posts; User: C_ntua
Are you allowed to use common APIs or libraries? For example make a full screen program that draws the circles as red in white background, capture a screenshot (from code), save screenshot in a...
I had a similar experience going from Windows Forms into WPF/XAML and indeed the run time linking had an impact in debugging for example. When the gluing wasn't correct you don't get the nice "failed...
I am trying to find a good enough way to store a security key in a software so even a user wouldn't be able to find it unless they spend a week or more of their time. There were a few attempts using...
There is actually a big list of where char* lacks when used for a string
1) Performance. Sometimes you need to check every single character when going through a loop to see if it ends with /0....
I think you should separate design of the software with the project management of it. You can look at UML for example how to modelize your code design. Then you can try to find an appropriate tool...
Come to Texas :)
Can you elaborate what you mean by "run-time" error? Do you mean the program crashes?
If that is the case a debugger is your friend (even your best buddy). If not for a debugger you can put some...
Wasn't aware of this and reading about it I have to admit that I am a just shocked...
I say create a TLV class first and available encoding as an enum with a value equal to the linked tag.
enum encoding { ASCII = 0x01, binary = 0x02};
class TLV
{
unsigned char tag; //a...
My turn to rephrase! "The string literal is of type const char[5]". The reason it works for an array is just because even if the syntax is similar it means something completely different. One is
...
You are comparing an "act" with a "thing". If you replace "programming" with "code" you will see that this is not the case, not the case at all. If you also replace music with playing a music...
Ah, I see, I see what you are trying to do there. Throw us in a different loop! :)
OK. To get out of the loop of "self-taught" let me just phrase it as "learn by experience". In this case I would say that no, you shouldn't learn programming only by experience. It is quite more...
It would practically make more sense having Java than C# as it more widely used and they are both as similar to C++. But it is just a "C Programming board" not a "Programming board" so the name was...
std::getline does have a delimiter, so:
std::vector<std::string> tokens;
std::string line;
while (std::getline(myfile, line, ' '))
tokens.push_back(line);
This is also more efficient...
Are you also suppose to leave 3 new lines or 2? You have 3 here from "gif" to "GIF"
HTTP/1.1 200 OK
Content-Length: 751635
Content-Type: image/gif
GIF89a�
This site is your friend
The Drake equation is nonsense in my opinion. First it is not mathematically correct, you assume that you have one civilization per planet which we don't even consider for earth. Or that one...
for(int i = 0; i < n; i++)
root = insert(root, A[i]);
this code already inserts element by element. I don't honestly understand what you are saying and it is programming, details matter. I...
This also points out that you cannot use an array[][] in general as you cannot specify the size since you need it flexible as you are passing its size as well. You can use int** instead.
Just to highlight that the size is actually not checked if you use the first so there is no actual reason to put it. It matters for a 2D array where you need to put the "minor" dimension like...
On a side note, strcpy() is evil due to being susceptible to a buffer overflow which could make your program vulnerable. Use strncpy() instead. This doesn't really matter for a program made for...
I think the usual case is not that you like a specific language it is just that you don't like learning a new language up to a level to be able to do what you could do with another language. You...
There are always quirks. See the FAQ of this board why checking eof in a loop might sometimes give you unexpected results for another one.
You will also see that when dealing with more complex...
Interesting enough going from C to C++ would actually solve the issue by using std::string, though fundamentally I agree with the argument that coming from a high level language can be harder to...