Author |
Message |
UBC_Wiskatos
|
Posted: Sun Jul 06, 2003 8:37 pm Post subject: (No subject) |
|
|
Homer_simpson wrote: i'm sure as hell that strcat(s, "r"); is just what i want but for some friggin reason the exe file that's being made wont run.. i get some critical error crap... could some1 try code: | #include <iostream>
#include <stdio.h>
#include <conio.h>
using namespace std;
int main()
{
char* ch;
ch="home";
strcat(ch, "r");
cout << ch<<endl;
return 0;
}
|
on their compiler and see if it works or not... thx...
Quote: i'm a mod now dude 
i already know that... but i dont think that mods are aloud to give free bits to them selves.. are they? 
Look at my example above, it shows you how to do it. I think your pointer stuff is messing your compiler up, it's tricky because you're adding one more character to the space in memory, and it's not as simple as just adding it (you need to reallocate memory and whatnot). What you need to do is make a char of a fixed size that can hold the size of the original string, plus the new string, that'll work. |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Homer_simpson

|
Posted: Sun Jul 06, 2003 11:36 pm Post subject: (No subject) |
|
|
aaaahhh...
strcpy and strcat were all i needed thanx man.. here have some bits =Þ...
+50 bits to UBC_Wiskatos |
|
|
|
|
 |
Homer_simpson

|
Posted: Sun Jul 06, 2003 11:51 pm Post subject: (No subject) |
|
|
ok here's another question... is there a command that will turn an integer or a float to a string...? |
|
|
|
|
 |
SilverSprite
|
Posted: Sun Jul 06, 2003 11:53 pm Post subject: (No subject) |
|
|
yes for chars its atoi and the related functions and you can also use sprintf |
|
|
|
|
 |
Homer_simpson

|
Posted: Mon Jul 07, 2003 12:05 am Post subject: (No subject) |
|
|
and the correct answer is..........sprintf..
silversprite is the winner... have some bits boy
+20 bits to silver
ty for your helps ppl... |
|
|
|
|
 |
UBC_Wiskatos
|
Posted: Mon Jul 07, 2003 12:21 am Post subject: (No subject) |
|
|
Homer_simpson wrote: aaaahhh...
strcpy and strcat were all i needed thanx man.. here have some bits =Þ...
+50 bits to UBC_Wiskatos
No prob!  |
|
|
|
|
 |
SilverSprite
|
Posted: Mon Jul 07, 2003 4:01 am Post subject: (No subject) |
|
|
so why is it that i only have one circle on my name?? how do you get more?? by posting?? or by the more bits you have?? |
|
|
|
|
 |
krishon
|
Posted: Mon Jul 07, 2003 8:43 am Post subject: (No subject) |
|
|
wut circle?? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Homer_simpson

|
Posted: Mon Jul 07, 2003 1:24 pm Post subject: (No subject) |
|
|
I get more circles... cuz i'm a programming god!!! read my name title 8) |
|
|
|
|
 |
AsianSensation
|
Posted: Mon Jul 07, 2003 1:35 pm Post subject: (No subject) |
|
|
SilverSprite wrote: so why is it that i only have one circle on my name?? how do you get more?? by posting?? or by the more bits you have??
it's something wrong with the site, dan is trying to fix it though.
and your status is suppose to change as you post more, i think right now you should be a NewBe Hacker.
but it gets frozen somehow....and doesn't change....
well, im assuming the changes are going to be made once the new compsci.ca comes out.....assuming they will release info on that.... |
|
|
|
|
 |
Tony

|
Posted: Mon Jul 07, 2003 2:42 pm Post subject: (No subject) |
|
|
your rank gets frozen if you have title effects for your rank...
its messed, lets just wait and see how v2 of the site will turn out. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
rizzix
|
Posted: Mon Jul 07, 2003 3:26 pm Post subject: (No subject) |
|
|
man i think dan has a lot on his shoulders,,
if we could only lessen the load for him...  |
|
|
|
|
 |
Mazer

|
Posted: Mon Jul 07, 2003 5:33 pm Post subject: (No subject) |
|
|
rizzix wrote: man i think dan has a lot on his shoulders,,
if we could only lessen the load for him... 
chop off his shoulders?
that'd surely lessen the load... everything would fall off! but somehow i get the idea that it could cause more problems in the long run. |
|
|
|
|
 |
SilverSprite
|
Posted: Mon Jul 07, 2003 6:15 pm Post subject: (No subject) |
|
|
hahahaha... oh wait..not very funny..  |
|
|
|
|
 |
|