Forum: C Aug 3rd, 2009 |
| Replies: 3 Views: 680 I'm assuming you mean a console program?
You'll have to know the width of the screen, typically is is 80x25, but it can always be different.
You can't do a gotoxy function in pure C, you'll have... |
Forum: C Aug 3rd, 2009 |
| Replies: 6 Views: 507 You will have to know how a stack frame is implemented on your system. I don't know if it is the same for all (or most) x86 systems, but from looking at this article on wikipedia... |
Forum: C May 23rd, 2009 |
| Replies: 5 Views: 357 >> I was also under the impression that VB passed BSTR strings to C/C++.
You're right, but I just designed my function around the hex output that I got... I decided before I went to documentation... |
Forum: C May 22nd, 2009 |
| Replies: 5 Views: 357 Well, back when I used VB a lot, I know if I tried to use anything but a basic character, it would show up as a question mark--also, the function I have written here is to change an ASCII string into... |
Forum: C May 22nd, 2009 |
| Replies: 5 Views: 357 alright, I did this without the help of documentation or help forums, I just sorta, figured it out on my own--and hacked together some code to make it work, and I'm super proud, so bare with me:
I... |
Forum: C May 17th, 2009 |
| Replies: 23 Views: 1,307 Clearly he has duplicated Narue's answer,
however, I don't agree with your second point...
I see no problem with contributing something to a solved thread, especially if there's more than one way... |
Forum: C May 14th, 2009 |
| Replies: 23 Views: 1,307 alright, just throwing it out there |
Forum: C May 14th, 2009 |
| Replies: 23 Views: 1,307 okay wait, even though this thread is solved, if it's a string couldn't you use strlen? Or just int length = 0; while(length++,*myString++);? |
Forum: Windows NT / 2000 / XP May 12th, 2009 |
| Replies: 4 Views: 561 lol, he's referring to the byte-order his operating system uses when storing data. say a 16 bit integer needs to be stored in memory by a program. It can either be stored in little endian format, or... |
Forum: Visual Basic 4 / 5 / 6 May 12th, 2009 |
| Replies: 1 Views: 762 fix'd.
Know what the problem was?
Public Declare Function callback Lib "C:\c\dll\mydll" (ByVal cbAddress As Long)
The function in the DLL doesn't return a value, so it should have been
... |
Forum: Visual Basic 4 / 5 / 6 May 11th, 2009 |
| Replies: 1 Views: 762 I've been able to design a front-end for a C DLL, calling the DLL functions from the VB program but I'm having trouble calling the VB functions from the C DLL. Maybe I should have put this in the C... |
Forum: C May 11th, 2009 |
| Replies: 3 Views: 836 |
Forum: C May 11th, 2009 |
| Replies: 3 Views: 836 What's the main difference between while(){ } and do{ }while() loops? From looking at it, it looks like the former evaluates before it performs the iteration and the latter does the evaluation after... |
Forum: *nix Hardware Configuration Apr 22nd, 2009 |
| Replies: 2 Views: 2,855 not too late, thanks for the tip |
Forum: C++ Mar 22nd, 2009 |
| Replies: 4 Views: 253 okay I see,
and yeah I guess the phrasing was a bit loose... but with a char array,
you can define it char x[]="rawrawrawrawrawr"; or char *x="rawrawrawrawrawr"; and have it behave the same, no?... |
Forum: C++ Mar 21st, 2009 |
| Replies: 4 Views: 253 I'm unsure of how declaring **x (a pointer to a pointer of x) is the same as declaring x[][] (a two-dimensional array of x's)... The theory I have is this:
int *x = {whatever}; (x is a pointer to... |
Forum: C++ Mar 14th, 2009 |
| Replies: 9 Views: 405 > Well, according to me: Its the knowledge about language that counts rather than what tools/text editor you use.
yeah, good point.
Also, I may have to give Code::Blocks a try, it looks pretty... |
Forum: C++ Mar 14th, 2009 |
| Replies: 9 Views: 405 why not? It is a forum... and I tried learning emacs but it got old quickly, I prefer using vim on *nix |
Forum: C++ Mar 14th, 2009 |
| Replies: 5 Views: 326 yeah, I know it's definitely a no-no, I just thought it was kind of cool, being able to cheat the compiler. Get back at it, for all these years of yelling at me, and telling me how wrong I am. Take... |
Forum: C++ Mar 13th, 2009 |
| Replies: 9 Views: 405 What editor/compiler does everyone use,
and,
what is your syntax highlighting like?
I'm using programmer's notepad 2, with a gcc win32 port...
with a stylish green-identifier, gray-text,... |
Forum: C++ Mar 13th, 2009 |
| Replies: 2 Views: 353 wrap this in tags, with indents. And what do you mean you "want to match void getdata() and void stock()"? |
Forum: C++ Mar 13th, 2009 |
| Replies: 5 Views: 326 #include<iostream>
using namespace std;
int main(){
int a;
int b;
asm("jmp c\n\t"); |
Forum: C++ Mar 9th, 2009 |
| Replies: 4 Views: 603 okay, thanks--and I figured out the scope pretty quickly, it's weird how if you
int z;
{
z=5;
}
then the z refers to the z outside the braces, but if you
int z; |
Forum: C++ Mar 9th, 2009 |
| Replies: 4 Views: 603 Well, I don't know if this is what you would call an anonymous function, or "Lambda" function I guess, I haven't really gotten that far into languages that use them yet...
but, I am writing a... |
Forum: Visual Basic 4 / 5 / 6 Mar 9th, 2009 |
| Replies: 8 Views: 613 oh, when I look at it, it says "c++vbfail.jpg".
and yeah, I know, I'm pretty fluent in VB but new in C++, I just wanted to see how people responded. Pretty awesomely, if you ask me. |
Forum: Visual Basic 4 / 5 / 6 Mar 8th, 2009 |
| Replies: 8 Views: 613 ok but wait, wat's the diff? o i no, it's that vb can't use classes rite? not OOP? ic
ps. look at the filename of the attachment, of course it's a joke :) |
Forum: Visual Basic 4 / 5 / 6 Mar 7th, 2009 |
| Replies: 8 Views: 613 hehe sorry I thought I was in gcc. My bad |
Forum: Visual Basic 4 / 5 / 6 Mar 3rd, 2009 |
| Replies: 8 Views: 613 I've tried everything, and I just can't get my program to compile in visual basic. Someone tell me what I'm doing wrong?
see attached image, are the includes in the wrong spot or WAT!??!?! |
Forum: Legacy and Other Languages Feb 25th, 2009 |
| Replies: 2 Views: 1,106 anyone know of a free ANSI lisp compiler for download?
I want to learn some lisp but I don't want to use REPL in emacs anymore... I want to write source code and compile it haha. |
Forum: C++ Feb 19th, 2009 |
| Replies: 12 Views: 642 I already marked it as solved, but just letting you know I got it all working, and I understand all the code now--thanks for the help, I learned a lot more about classes. |
Forum: C++ Feb 19th, 2009 |
| Replies: 12 Views: 642 awesome, thanks a lot for your help |
Forum: C++ Feb 18th, 2009 |
| Replies: 12 Views: 642 well it works really well but there is some syntax here that I don't completely understand...
virtual void saveMessage(const char* pmsg) = 0;
virtual means that the child class will inherit this... |
Forum: C++ Feb 18th, 2009 |
| Replies: 12 Views: 642 sounds perfect... how would I declare a pointer in the A class though?
Like, would I just go B &errorTarget;?
or would I use the * operator? The most I've really worked with pointers so far is in... |
Forum: C++ Feb 18th, 2009 |
| Replies: 12 Views: 642 In my example code above,
if I called something.someObject[2].setErrorMessage("BIG ERRAR!");,
and then in A::setErrorMessage(char*), used the this operator, would "this" refer only to someObject[2]... |
Forum: C++ Feb 18th, 2009 |
| Replies: 10 Views: 460 hey thanks, I wondered how others did it.
Also, flame wars might be appropriate considering your avatar.
Also, back to the original problem in the thread,
Not everybody is going to have the same... |
Forum: C++ Feb 18th, 2009 |
| Replies: 7 Views: 458 in your first post, you need to end the class with a ; after the closing brace
class name {
...
};
you would access it by creating an instance of the class in a declaration,
class clName{... |
Forum: C++ Feb 18th, 2009 |
| Replies: 10 Views: 460 lol oh noz progamming flame warz |
Forum: C++ Feb 18th, 2009 |
| Replies: 12 Views: 642 lol what's bad about it? I put it in that order because class A has to be known before I can declare an object of type A in class B, the classes need to interact with each other, that is my problem.... |
Forum: C++ Feb 17th, 2009 |
| Replies: 12 Views: 642 but there is a need for class A to be in class B |
Forum: C++ Feb 17th, 2009 |
| Replies: 10 Views: 460 it's a syntax error, the compiler will tell you what line it's having a problem with. Take that line of code, or the procedure that line of code is in, wrap it in [ code=cpp] [ /code] tags (without... |