|
I had an article, but i lost it, it showed and described a couple of c/c++ tricks that ppl should be careful. One of them interested me but now that i am trying to replicate it I'm not being able to put it to compile.
The concept was that it is possible...
Started by fmsf on
, 11 posts
by 11 people.
Answer Snippets (Read the full thread at stackoverflow):
The reason is that if youDid you try this?
ptr = const_cast<int *>(ptr_to_a);
That should help it compile #include <stdio.h> void....
To be reasonable (after all, you're just adding a const , which is normally ok).
|
|
Char *s = "hello ppl."; for (i = 0; i < strlen(s); i++) { char c = s[i]; if (c >= 97 && c <= 122) { c += 2; s[i] = c; } }
I want to rotate the string by two characters: "hello ppl." -> "jgnnq rrn."
I am getting a segmentation fault . What ...
Started by cambr on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
That's because string....
Str[] = "hello ppl."; const char * const from = "abcdefghijklmnopqrstuvwzyz"; const char * constThe code:
char *s = "hello ppl.";
gives you a pointer to what it almost certainly read-only memory.
|
|
Have a simple container class:
public Container { public: Container() {} Container(const Container& cont) //option 1 { SetMyString(cont.GetMyString()); } //OR Container(const Container& cont) //option 2 { m_str1 = cont.m_str1; } public string GetMyString...
Started by cbrulak on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Be something like this:
class Container { public: Container() {} Container(const Container& cont) : m_str1 are copying an ill formed object in the first place, for example:
Container(const string& str) : m_str1(const Container& rhs....
|
Ask your Facebook Friends
|
Just to say hello all, I gained my pvt ppl in 84 then unrestricted in 86 also Const Spd Retrac Endorsement and did the Training for NVMC but had problem with ADF so didnt complete the flight test, flew approx 150hrs up to 1992 Flying mainly Cessna up ...
Started by Ed Herring on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at aircraftpilots):
Recreational Aviation is growing rapidly and you are part of the reason for this.
To flying.
|
|
And for my 1000th post I will perform the following trick:
Just kidding, I will explain how to use the Dynamic Wrapper.
The Dynamic Wrapper (or DynaWrap/DynaCall) allows you to call Win32 API's.
This is something most scripting languages do not support...
Started by Arend_ on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at kixtart):
Brad Well....
Multiple characters couldn't.
A single character was something that could easily fit into an 8 bit processor's register .
If you put multiple characters together, you created a string .
Very nice!
In 7 bit ASCII, each character is a single byte .
|
|
Hey guys, So my assignment is to create multiple classes for a Person, Name, ID #, Address, and Phone #.
Name makes up: First, Middle, and Last name. ID # makes up: 9 digits. Address makes up: street, city, state, and 5 digit zip code. Phone # makes up...
Started by nick on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
The static and const modifiers tell the compiler.
Faster:
static const char menu_text[] = " Type '1' - to open a file for reading or writing\n" "\n" " Type for a ';' until the end of the last text line.
|
|
On Sun, 19 Jul 2009 11:12:24 -0700, "mastermind" <mastermind@work.now
In March:
Cops plead not guilty to robbery in driver attack
The Province - March 30, 2009
The two Lower Mainland police officers charged after an attack on a newspaper delivery...
Started by mastermind on
, 6 posts
by 4 people.
Answer Snippets (Read the full thread at omgili):
Am looking for the address of Dave Reynolds and any info about him that besides stealing ... .
Is a liar and perjurer and he attacks ppl for no reason and then calls Vancouver Police if he loses or the GRC if you are one of those ppl.
|
|
This NPC Allows Hunters to get free pet for just talking to npc and choosing witch one you whant!
Code: /*Azolex's Beast master script! This is originally by ArcEmu Arena tournament project its been fully fixed and edited by me! Fell free to use it :)...
Started by AzoleX on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at wowps):
Just a question.
Keep up the great work..
And im sure this will aid MANY ppl...
Kudos...
Work mate..
|
|
On Thu, 30 Apr 2009 00:15:49 +1000, "Dr. Sir John Howard, AC, WSCMoF" <malcum.fabian.is.a.swine@mt.barker
http://www.news.com.au/story/0,27574,25404637-29277,00.html
A MOTORCYCLIST ran into an elderly pedestrian and then tried to kick her away ...
Started by WSCMoF on
, 48 posts
by 21 people.
Answer Snippets (Read the full thread at omgili):
Labouring; EGO: #398 / #42 - Generating Things/ Reason's Modifications;
I-Ching: H60 - Restraint,
col: 4, nous: 10 [Super: #393 / #62 - Construing a Guide/ Practise
Reason; I-Ching: H23/ Reason's
Realisation; I-Ching: H58 - Joy....
|
|
This is probalby another cultural difference.
I hear so many qq'ing and thinking rerolling from PP to WC or another..
My reply is just to give you a different point of view.. so don't tackle.
Koreans don't expect PP to fight. They expect them to buff ...
Started by destructor on
, 20 posts
by 18 people.
Answer Snippets (Read the full thread at lineage2):
You've never pvped in your life, have you? Theres is no reason to pick missing I think the....
The reason the matching system was never really used much be a problem for a well-played prophet.
Defensive buffs, resists that wc/ol don't have.
|