Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Le Pointeur

Name: Anonymous 2012-05-10 9:35

int *p
int * p
int* p (faggot)

Name: Anonymous 2012-05-10 10:05

I agree wholeheartedly.

Name: Anonymous 2012-05-10 11:03

"int *p"
This.

Consider the following:

int* a, b;

a's type is int *, b's is int.

Name: Panjo Batterson 2012-05-10 11:13

>>3
That's right jeffery. Pull one of these, "int* p" and you're one step closer to having demons flyin' out your nose.

Name: Anonymous 2012-05-10 12:20

>>3
Still, int* p makes more sense for single declarations: a pointer on an int.

Name: Anonymous 2012-05-10 12:26

int *p because declaration mirrors usage.

Name: Anonymous 2012-05-10 12:34

Meh, I use Type * symbol but whatever

Name: Anonymous 2012-05-10 13:01

I used int* p when I was a newfag, but switched to int *p once I stopped being retarded.

My face when I learned the Hardcore Post-Unix Wizards who write Plan 9 use int* p.  I'm not sure what they do for int *p, *q though.

Name: Anonymous 2012-05-10 13:04

>>8
>I'm not sure what they do for int *p, *q though.
They make one declaration per line.

Name: Anonymous 2012-05-10 13:04

int *p, as in the result of dereferencing p is an int.

Name: Anonymous 2012-05-10 13:11

>>9

Oh, that makes sense.

Name: Anonymous 2012-05-10 13:14

>>10
int* p, as in the result of p is a pointer to an int.

Name: Anonymous 2012-05-10 13:54

>>12
int* p, q as in the result of p is a pointer to an int but q is just an int.
Sure, that makes a lot of sense.

Name: Anonymous 2012-05-10 14:40

>>13
See >>9

Name: Anonymous 2012-05-10 15:50

int* p is far more readable.
"Int pointer. P."


int *p is awkward.
"Int. Pointer P."

So I use


int * p.

This way both parties get pissed off.

Name: Anonymous 2012-05-10 15:56

>>9
one declaration per line.
Now that's what I call being a full-fledged fine gentleman of African descent.

Name: Anonymous 2012-05-10 16:01

Newfriend-san, the (faggot) option is always the correct one, so you kind of messed up since the (faggot) option in your post actually is the worst one.

int * p; is obviously best since it's more uniform with declarations such as int * restrict p;.

Name: Anonymous 2012-05-10 16:08

>Whitespace

Name: Anonymous 2012-05-10 16:18

Star on the left and one variable declaration per statement and line to make for smaller patches when adding and removing variables.

Kind of sucks when you want to put some consts in there though :(

Name: Anonymous 2012-05-10 16:21


typedef int* intp;

intp p, q;

Name: Anonymous 2012-05-10 16:49

>>20
Microsoft style:
typedef struct _D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT {
    D3DAUTHENTICATEDCHANNEL_QUERY_OUTPUT Output;
    UINT NumUnrestrictedProtectedSharedResources;
} D3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT, *PD3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT, *LPD3DAUTHENTICATEDCHANNEL_QUERYUNRESTRICTEDPROTECTEDSHAREDRESOURCECOUNT_OUTPUT;

Name: Anonymous 2012-05-10 17:24

>>21
That looks like Microsoft's way of getting people to use .net instead.

Name: Anonymous 2012-05-10 17:40

>>21
  [
  uuid(2573F8F4-CFEE-101A-9A9F-00AA00342820)
  ]
  library LHello
  {
      // bring in the master library
      importlib("actimp.tlb");
      importlib("actexp.tlb");
 
      // bring in my interfaces
      #include "pshlo.idl"
 
      [
      uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820)
      ]
      cotype THello
   {
   interface IHello;
   interface IPersistFile;
   };
  };
 
  [
  exe,
  uuid(2573F890-CFEE-101A-9A9F-00AA00342820)
  ]
  module CHelloLib
  {
 
      // some code related header files
      importheader(<windows.h>);
      importheader(<ole2.h>);
      importheader(<except.hxx>);
      importheader("pshlo.h");
      importheader("shlo.hxx");
      importheader("mycls.hxx");
 
      // needed typelibs
      importlib("actimp.tlb");
      importlib("actexp.tlb");
      importlib("thlo.tlb");
 
      [
      uuid(2573F891-CFEE-101A-9A9F-00AA00342820),
      aggregatable
      ]
      coclass CHello
   {
   cotype THello;
   };
  };
 
 
  #include "ipfix.hxx"
 
  extern HANDLE hEvent;
 
  class CHello : public CHelloBase
  {
  public:
      IPFIX(CLSID_CHello);
 
      CHello(IUnknown *pUnk);
      ~CHello();
 
      HRESULT  __stdcall PrintSz(LPWSTR pwszString);
 
  private:
      static int cObjRef;
  };
 
 
  #include <windows.h>
  #include <ole2.h>
  #include <stdio.h>
  #include <stdlib.h>
  #include "thlo.h"
  #include "pshlo.h"
  #include "shlo.hxx"
  #include "mycls.hxx"
 
  int CHello::cObjRef = 0;
 
  CHello::CHello(IUnknown *pUnk) : CHelloBase(pUnk)
  {
      cObjRef++;
      return;
  }
 
  HRESULT  __stdcall  CHello::PrintSz(LPWSTR pwszString)
  {
      printf("%ws
", pwszString);
      return(ResultFromScode(S_OK));
  }
 
 
  CHello::~CHello(void)
  {
 
  // when the object count goes to zero, stop the server
  cObjRef--;
  if( cObjRef == 0 )
      PulseEvent(hEvent);
 
  return;
  }
 
  #include <windows.h>
  #include <ole2.h>
  #include "pshlo.h"
  #include "shlo.hxx"
  #include "mycls.hxx"
 
  HANDLE hEvent;
 
   int _cdecl main(
  int argc,
  char * argv[]
  ) {
  ULONG ulRef;
  DWORD dwRegistration;
  CHelloCF *pCF = new CHelloCF();
 
  hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
 
  // Initialize the OLE libraries
  CoInitializeEx(NULL, COINIT_MULTITHREADED);
 
  CoRegisterClassObject(CLSID_CHello, pCF, CLSCTX_LOCAL_SERVER,
      REGCLS_MULTIPLEUSE, &dwRegistration);
 
  // wait on an event to stop
  WaitForSingleObject(hEvent, INFINITE);
 
  // revoke and release the class object
  CoRevokeClassObject(dwRegistration);
  ulRef = pCF->Release();
 
  // Tell OLE we are going away.
  CoUninitialize();
 
  return(0); }
 
  extern CLSID CLSID_CHello;
  extern UUID LIBID_CHelloLib;
 
  CLSID CLSID_CHello = { /* 2573F891-CFEE-101A-9A9F-00AA00342820 */
      0x2573F891,
      0xCFEE,
      0x101A,
      { 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
  };
 
  UUID LIBID_CHelloLib = { /* 2573F890-CFEE-101A-9A9F-00AA00342820 */
      0x2573F890,
      0xCFEE,
      0x101A,
      { 0x9A, 0x9F, 0x00, 0xAA, 0x00, 0x34, 0x28, 0x20 }
  };
 
  #include <windows.h>
  #include <ole2.h>
  #include <stdlib.h>
  #include <string.h>
  #include <stdio.h>
  #include "pshlo.h"
  #include "shlo.hxx"
  #include "clsid.h"
 
  int _cdecl main(
  int argc,
  char * argv[]
  ) {
  HRESULT  hRslt;
  IHello        *pHello;
  ULONG  ulCnt;
  IMoniker * pmk;
  WCHAR  wcsT[_MAX_PATH];
  WCHAR  wcsPath[2 * _MAX_PATH];
 
  // get object path
  wcsPath[0] = '\0';
  wcsT[0] = '\0';
  if( argc > 1) {
      mbstowcs(wcsPath, argv[1], strlen(argv[1]) + 1);
      wcsupr(wcsPath);
      }
  else {
      fprintf(stderr, "Object path must be specified\n");
      return(1);
      }
 
  // get print string
  if(argc > 2)
      mbstowcs(wcsT, argv[2], strlen(argv[2]) + 1);
  else
      wcscpy(wcsT, L"Hello World");
 
  printf("Linking to object %ws\n", wcsPath);
  printf("Text String %ws\n", wcsT);
 
  // Initialize the OLE libraries
  hRslt = CoInitializeEx(NULL, COINIT_MULTITHREADED);
 
  if(SUCCEEDED(hRslt)) {
 
 
      hRslt = CreateFileMoniker(wcsPath, &pmk);
      if(SUCCEEDED(hRslt))
   hRslt = BindMoniker(pmk, 0, IID_IHello, (void **)&pHello);
 
      if(SUCCEEDED(hRslt)) {
 
   // print a string out
   pHello->PrintSz(wcsT);
 
   Sleep(2000);
   ulCnt = pHello->Release();
   }
      else
   printf("Failure to connect, status: %lx", hRslt);
 
      // Tell OLE we are going away.
      CoUninitialize();
      }
 
  return(0);
  }

Name: Anonymous 2012-05-10 17:43

>>23
fuck fuck fuck

Name: Anonymous 2012-05-10 17:46

>>20
Die in a fire

Name: Anonymous 2012-05-10 18:03

>>21
Dear god, I thought that it was a joke but I decided to google a bit and figured it is real:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd318335%28v=vs.85%29.aspx

Name: 26 2012-05-10 18:06

Also, I find it funny that some of the struct names don't fit in the sidebar even when it's fully maximized.

Name: Anonymous 2012-05-10 18:13

>>26
That is insane.

Name: Anonymous 2012-05-10 23:56

microfail

Name: Anonymous 2012-05-11 0:23

>>26
What the fuck.

Name: Anonymous 2012-05-11 0:37

inb4 enterprise quality
inb4 back2imgboards

Name: Anonymous 2012-05-11 6:35

So, important question, are there any compilers that care?

Name: Anonymous 2012-05-11 7:21

>>19
Are you trolling, on dial-up or just dense?
I... I can't decide.

10/10

Name: Anonymous 2012-05-11 9:00

Le

Get out.

Name: Anonymous 2012-05-11 9:02

>>9
why not int* p,* q;

Name: Anonymous 2012-05-11 11:10

>>34
Contrary to popular belief, person-who-is-used-to-markdown-quotes-and-is-therefore-a-hypocrite, Reddit did not invent French.

Name: Anonymous 2012-05-11 12:39

>>34
Give her le pointeur

Name: Anonymous 2012-05-11 13:09

>>36
Reddit didn't invent the word ``meme" either, yet it makes me sick every time I read it.

Name: Anonymous 2012-05-11 16:20

>>38
memes are epic lulz, fuck you fgt go kill urself u cock sukin fagshit xD

Name: Anonymous 2012-05-11 16:22

>>39
I AM THE MOST FUCKING NGGER SUBTLE

Name: Anonymous 2012-05-12 4:47

>>36
Contrary to popular belief, person-who-is-used-to-markdown-quotes-and-is-therefore-a-hypocrite

I am not a hypocrite, sir, I simply enjoy the aesthetics of a double line break. Who are you to judge me?

Name: bampu pantsu 2012-05-29 4:52

bampu pantsu

Don't change these.
Name: Email:
Entire Thread Thread List