- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
46 Posted Topics
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 [URL="http://en.wikipedia.org/wiki/Call_stack"]this article on wikipedia[/URL] it looks like it could be this: [code] +==========================+-+ | locals for function() | …
I've been writing in visual basic for a number of years and have suffered so much criticism just for using the language. It's so easy to pick up and it can be compiled to an executable, that's why I learned it... From what I've gathered, the things that are "wrong" …
wat? make some kind of activation key algorithm. Sell the software online, when a user orders a copy just send out a CD containing your software with an activation key on it? It doesn't have to be professional really...you could just burn CDs and write on them if you wanted …
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 to read into the O/S dependent libraries for your system (I don't know …
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.
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 compiled a C DLL, which was loaded into a VB6 app. The …
okay wait, even though this thread is solved, if it's a string couldn't you use strlen? Or just [icode]int length = 0; while(length++,*myString++);[/icode]?
[QUOTE=Xlphos;867320]Hello, I am not too sure what you are asking. Usually when I talk about system architecture I refer to 32-bit or 64 bit architecture. Broadly I would say it is to do with design and operation of the computer. I think you are confused with sizes. I would say …
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, but I don't know. If I have this in …
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 each iteration... is that correct? Why would I pick one over the other? Is it mainly just …
I downloaded a backtrack ISO and burned it to DVD. When I boot my computer from it, I cannot get it to work with the wireless device in my laptop... I have an acer aspire 5000 series with a broadcom 802.11g network adapter... Anyways to make it run more smoothly …
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 the first int value) *x (first array item, value pointed to …
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, white-operator, blue-comment, red literal on black background.
[code=cpp] #include<iostream> using namespace std; int main(){ int a; int b; asm("jmp c\n\t"); a=7; b=12; asm("d:\n\t"); cout<< a<< endl<< b<< endl; return 0; } int pewp(){ int a; int b; asm("c:\n\t"); a = 3; b = 2; asm("jmp d\n\t"); } [/code] this will output [code] 3 2 [/code] what I …
wrap this in [noparse][code=cpp] [/code][/noparse] tags, with indents. And what do you mean you "want to match void getdata() and void stock()"?
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 function that is rather long. And I want to just get through it, and …
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!??!?!
so say I have something like this: [code=cpp] #include<iostream> class A{ public: void setErrorMessage(char*); } void A::setErrorMessage(char* errMessage){ // code here to set B::errMsg } class B{ public: A someObject[3]; char* errMsg; } int main(int argc,char** argv){ B something; B another; something.someObject[2].setErrorMessage("BIG ERRAR!"); another.someObject[0].setErrorMessage("everything's okay!"); cout<< something.errMsg<< endl; cout<< another.errMsg<< …
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 the spaces of course) and place it here. Also, "it's not …
in your first post, you need to end the class with a ; after the closing brace [code] class name { ... }; [/code] you would access it by creating an instance of the class in a declaration, [code=cpp] class clName{ ... public: char* publicMember; };[/code] for example. Now, you …
So, I'm dynamically allocating a char array in a function, then returning that array to an un-allocated char array in main(). Code: [code=cpp] #include<iostream> using namespace std; char* cc(char*,char*); int main(){ char* strMain; char* str1="Well, hello there, "; char* str2="How are you?"; strMain=cc(str1,str2); cout<< strMain; } char* cc(char* str1,char*str2){ char* …
How would I write a function with an undefined number of arguments? Like, how when using printf(), you write the string in the first argument and in the string use format identifiers. Then, for each format identifier you use is an argument specifying what should be put there in the …
So I got past my last problem using new[], but now I seem to have a new one... I created a char***, var. The goal was to build each dimension of the array to be different sizes at different times, based on separate user input... Here is the code: [code=cpp] …
The problem with the char is this line: [icode]davesDog.setGender("M");[/icode] "M" is a character array, you are passing the letter M and a NULL character ('\0') to the setGender function (the NULL character ends a character array, and it is done automatically when using double quotes). You should use single quotes, …
Here is what I wrote, [code=cpp] #include<iostream> using namespace std; int main(int argc,char**argv){ int siz=0,i=0,n; cout<< "\nHow big? "; cin>> siz; cout<< endl; while(i<siz){ if(i==0||i==siz-1){ n=0; while(n<siz){ cout<< "* "; n++; } } else { cout<< "* "; n=2; while(n<siz){ cout<< " "; n++; } cout<< "*"; } cout<< endl; …
I installed backtrack 3 onto a USB flash drive. I installed it on a fat32 primary partition (sda1), gave it a 1gb swap, a ext2 storage partition (sda3), and a fat32 storage (sda4). When I boot to windows and insert the flash drive, it shows up in My Computer, as …
I'm trying to use new but I can't seem to get it right... in this example I ask how many strings the user would want to input, then ask for each one, then echo them back. [code=c++] #include<iostream> using namespace std; int main(int argc, char** argv){ int num, i; char** …
I'm trying to write a class that will read and organize the command line arguments of a program. Like, it will read -a as a 'switch', and --abcd as a 'switch' and you can define different switches as having parameters, so -a bc de fg will have bc and de …
an MS-DOS window is different than running it from the run command... if you just run it from the run dialog it will open the window, run the program, and then close when it is finished. From an MS-DOS prompt it does the same thing, just if it is run …
So, supposing I do manage to compile a DLL with exports, how does the DLL work with my code? How would I check for the DLL on the system, and then, how would I link to it? Also, Can a DLL written in C++ be used in a VB application? …
how would I go about making a variable in a class, that could be read directly but not written as such? Like, [icode]if(class1.variable==true){ }[/icode] is allowed but [icode]class1.variable = true;[/icode] is not... however I don't want a [icode]const[/icode], I want it to be able to be set from within the …
I'm using a windows port of gcc, g++, etc. as a compiler. How would I compile a DLL, and define/use its exports? Can I compile header files, classes, etc. into a DLL or only functions? Can DLL functions call functions in a program, or is it only one-way? For example, …
[icode] someprogram.cpp -----------> #include<string> | | #include"someheader.h" V someheader.h --------------> #include<string> [/icode] what happens if I do this? Is it necessary to include the headers into all files that use them, or can you just go [code=C++] #include<string> #include... #include"someheader.h" #include"anotherheader.h" [/code] and string and other required headers will be …
I was just curious, besides the APIs and DLLs, etc, what is the difference between C++ compiled in windows, and C++ compiled in linux? Is it just the OS interrupts used in the machine code or what?
what would I use pointers for? I used to have a vague understanding of a pointer... like, *ptr is the value pointed to by the pointer, ptr is the address the pointer is pointing to, and &ptr is the address of the pointer itself? or something? the one example I …
I'm trying to learn C++, and I thought I'd start by exploring classes, so I wrote this: [code=c++] #include<iostream> #include<string> using namespace std; class user { public: string logonName; string firstName; string lastName; int uID; }; int main(){ user users[2]; int i; users[0].logonName = "rawrMander"; users[0].firstName = "Rawr"; users[0].lastName = …
Should I avoid casting between data types? I haven't really seen much about the use of this, but it seems like one of those last-minute-no-way-around kind of methods... but, for example, how would I use the length of a string in a for loop? The length property of a string …
Can I do this? [code=c++] while(variable=functionCall()!=0){ /* ... */ } [/code] the function I'm calling, is returning a 3, but the variable in the while loop is equal to 1... I'm not sure what is happening in this statement, Originally I thought it would just always evaluate to true and …
maybe you can send like WM_* messages to the message box window or something?
so how difficult would it be to install an early early early version of DOS or Windows to my laptop, and sort of upgrade it myself to work with all of my hardware? To write drivers for my CD drive, wireless network card, etc- until it is a functional and …
Are there any reeeally good books on programming C++ that anyone knows of? Ones that just do an excellent job of teaching different techniques and clean coding practices, as well as things that can really be applied (like making and styling windows, communicating via TCP/IP, etc)?
is there even such a thing as just a VB6 compiler that works like GCC or something?
Just wondering, since assembly code is more or less what every other language is compiled into, would it be useful to learn how to do things in assembly before learning say, C or C++, pascal, python, etc? I am already fluent in Visual Basic but I want to get to …
so, what is python and what is good about it?
I'm looking into learning some more languages and some better code writing techniques, but I am not sure of the languages that I should delve into. So far I know VB really well and I started learning assembly, but I don't know that past some, I guess, medium difficulty, 16 …
binary is just another number system that can be used to display a set of the same data. a "c" can be displayed as the decimal (base 10 number system, 0 to 9) 99, or as a hex value (base 15 number system, 0 to 9, A to F) 63 …
The End.