zxactly.
I was gonna like this but then I realized that the like button is long gone O.o
Type: Posts; User: Aslaville
zxactly.
I was gonna like this but then I realized that the like button is long gone O.o
Hello all,
I'm pitching for a 'contract' and part of technical test involves me writing unit tests for a C++ application. I barely have any experience with unit tests.
Say we have a simple...
Did you check out Practice coding with fun programming challenges - CodinGame ? Yeah, I know you talked about challenge websites but I found this one kind of a bit different; with a lot of community...
#include<stdio.h>
#include<stdlib.h>
#include<share.h>
#include"stdafx.h"
int main(void)
{
FILE *stream
char c;
if (fopen_s(&stream, "NetWorkNeu1.txt", "r") != 0)
-- MSDN
You don't have such in your code.
Yeah, you're correct but I think the OP was implying that Xamarin, after being acquired by M$ might at some point, if it has not yet already be limited to certain platforms.
What does Xamarin being acquired by Microsoft have to do with it being cross platform ? You might want to look at Qt.
You can only free what you allocated with malloc. In the above code 'p_array' looks like a global variable or something which means you don't have to free it.
What do you mean by DMA ? I take...
Yes, a definition followed by a typedef makes much more sense but I was trying to follow some coding style.
The suggested solution works (you're the best!) but doesn't quite match the coding style...
Thanks you. This is much more flexible than I was hoping or could ever come up with :-)
I'm trying to define a struct and typedef it with a single statement. I'm following the example described herehttps://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/Type-Attributes.html but I seems to be having...
That's an option!
No, There's no difference between the two I just wrote that because I was blindly following what's specified ;-)
I might be doing this wrong but here's the idea. 'evt' is...
Huh, You're right.
It should be something like
*(uint64_t *)&evt[4] = rshift != 0 ? cpu_to_le64(addr) :\
cpu_to_le64(addr) >> rshift;
Is there a...
I have this macro which, obviously assumes that the provided type is the correct and expected type.
#define ENCODE_EVENT(devid, info, addr, rshift) do { \
*(uint16_t *)&evt[0] =...
You sound *sooooooo* determined. Would you mind explaining why ?:)
Well, in my case, I was wondering why we are not using 'sizeof' ? Am I missing something or should 'sizeof' be enough ?
#include <stdio.h>
int main (void)
{
Talking about integer is ambiguous. We can have 'short' integer, integer, long integer, long long integer.
I think you're talking about long integer which is typically 64-bits on 64 bit machines....
That's right!
fscanf expects pointer to a string _not_ the address of a pointer.
You need something like
/* passing the pointer */
int...
It's actually for internal storage but this is some really obscure software so I guess I will go with the above approach.
Am trying to use bitfields in a portable way but am not sure my solution is the best one. I could be missing something.
I am declaring the bitfields conditionally based on the target-architecture....
Are you sure about that ?
You don't need to explicitly write that just
triangle aTriangle;
I'd go with #1 - it's what most 'modern' game engines, at least the one's I've looked at do.
:D:D:D
Am not sure I got the restriction quite right. Am going to give an example with how a simple implementation of strcmp works hope you can apply this to your problem. It should only be a slight...
Do you need the function 'find', I guess not. Myself I could have had.
void DeleteNode(int v){
cout<<v<<" is deleted."<<endl;
Node *cur=head;