| |
| |
| |
|
Comments:
<0> hallo <0> hallllllllllllo <0> I am white human <1> wb <2> hi i am trying to create an array of enum and it is giving me error incomplete type :/ <3> That's because enums aren't types in C. <3> Just use int. <2> ok
<2> so <2> ahh yes u r right <3> Additional reading: http://c-faq.com/struct/enumvsdefine.html <2> 10x :) <3> np <2> by the way can i compare an int with a constant in an if statement ? <4> if the constant is of type int, why not ? <2> #define MAX = 6; (is this an int ?) <2> ill check <4> why asking when it takes about 10 seconds to try ? <5> hody <5> howdy <5> anyone knows if there is such thing as a sql server C api? <5> something like the mysql C api... im working on a ansi C project and couldnt find any C sql server apis <2> #define FALSE = 0; int my = FALSE; if(my == FALSE) (is giving me parse error before =) <6> delete ";" from #define FALSE = 0; <6> and '=' too <6> #define FALSE 0 <2> 10x joscal it worked <7> Anyone around? <7> What are others' thoughts here on implementing a Doom 3 model viewer? <8> hi this channel what help give ? <9> where can i find a listing of c librairies ? <10> m0o: there are so many you can't list them all <9> well, the main ones at least <10> There is only 1 main one, the C runtime <9> i was wondering, if i have an array that will keep the same value all trought my program, should i #define it ?
<11> moo: You can't really do that. What, precisely, is this array going to look like, and how will it be used? <9> notes of a piano <9> it will represent one octave <9> but that was my question, we don't usually define arrays, aren't we ? <11> As I said, you can't really do that. What would it look like? <9> #denife OCTAVE{"do", "R", "Mi", "Fa", ...} <11> But that's not going to work how you want it to. <9> k <11> C99 sort of would allow that, but there's no real reason. <11> Just use a real array. <9> indeed ! <9> sank you <11> Sure. <2> u jek an ek tibatli wah al ***ignment ta nezval <2> sorry mistake <2> hi if i have a char * str; and i use str = (char *)strcat(str,"x"); is this unsafe ? i mean should i use malloc before ? str = (char *)malloc(sizeof(char)); ? <12> remove all the casts. <12> room for a single character is insufficient space for a string of length 1. <2> i shouldnt cast ? <12> nope. <12> i.e., almost never. <2> so twkm i should realloc exch time a concatinate ? <12> no, you should allocate enough room for the string you want to place in the buffer. <2> fair enough but lets say i dont know how long it will be ? <12> how can you not know? use strlen if necessary. <2> ok 10x :) <12> remember to provide room for the entire string, including the terminator which is not counted by strlen. <2> thank you i will <2> one question that just arose whats the difference between strcat and the + operator ? <13> the + operator doesn't exist in C <13> well at least not in the sense that you're talking about <13> in C++ the + operator can be overloaded to work with the string cl*** type, in C there is no string cl*** type or operator overloading. The result of adding 2 character arrays is just adding their respective memory addresses together, which results in nothing useful. <2> wow thats really dangerous
Return to
#c or Go to some related
logs:
#linux #php 12WHAT ARE THE ROARING FORTIES ? #MissKitten hostname multihomed yast #AllNiteCafe #php #AllNiteCafe #linux xiz-zobb trid
|
|