49,761 Topics
| |
My problem is this. I am making a script engine using lua 5.1.4 for a game engine. At some point I want my script to be able to create an event for example a InitializeEvent (there are other events) which will be done through calling this method: [code=cpp] int ParticleSubSystem::GetIniEvent(lua_State* … | |
Hi, I've written some fnc and when I tested it it works perfectly but when I switch from debug mode to release mode I'm getting error: Intrisinc function, cannot be defined. Any idea what's wrong? [CODE] typedef unsigned int u_int; int strcmp(const char* s, const char* s1) { u_int size_s … | |
Hello, I like to study the C++ language. explain the basic concepts. | |
Hai , For that last two hours i have been troubling with a problem. I want to get the modified date of a text file. i wrote a sample program , worked fine. But when i attached this program as a function to my actual application , it shows the … | |
here's a function I tried to write that reverses the order of a c-string [code=cplusplus] void reverse(char *wordPtr) { char revWord[SIZE]; int count = 0, // index counter newSize = 0; // to count word size while (wordPtr[count] != '\0') { newSize += 1; count++; } cout << "The size … | |
hi im new in this site and i have a problem on making a c++ program.. i can't understand it well.. can someone help me please.. im willing to understand on what will u teach on me.. | |
Ok, I've tried literally over 100 things and still can't figure this out. I want to add strings that I've loaded from a text file to a list box. Here is my coding: [code=cplusplus] vector<string> spnV; //this is a global variable BOOL LoadTextFileToEdit(LPCTSTR pszFileName) { ifstream inStream(pszFileName); if(!(inStream.is_open())) { MessageBox(NULL, … | |
Hello all! I am typing in some code from an example in my book, but it shows the absolute value symbol, I believe, looking similar to " l l ", but it can't be just to lower case Ls spaced apart like I just made that...or is it? If not, … | |
i face a problem, im doing a programing that program into the PIC16F684. im doing a digital clock, now i only able to show the second value that display 1 to 60, i dont know how to do the minute value. im using while loop. [code=c] while(1 == 1) { … | |
I am new here and this is my first post. I have a question that I can't find on google. I'd be grateful if you could help me. I have written many programs dealing with arrays and wanted to know how can I validate an input. Say I have the … | |
I am using dev-c++ with allegro here is the code: [code=cplusplus]#include <allegro.h> int SCREEN_WIDTH; int SCREEN_HEIGHT; BITMAP *buffer; int main(int argc, char *argv[]){ allegro_init(); install_mouse(); SCREEN_WIDTH = 620; SCREEN_HEIGHT = 240; set_color_depth(16); set_gfx_mode( GFX_AUTODETECT_WINDOWED, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0); show_mouse(screen); buffer = create_bitmap(SCREEN_WIDTH, SCREEN_HEIGHT); putpixel(buffer,300,300,4); blit(buffer,screen,0,0,0,0,SCREEN_WIDTH,SCREEN_HEIGHT); while(!key[KEY_ESC]){ //do stuff clear_keybuf(); } … | |
here is what i have so far, it compiles and runs great except for the fact that when i enter 'n' it doesn't stop the loop, any help is greatly appreciated! [CODE]/* Write a program that prompts the user for two numbers – the dividend and the divisor – and … | |
I am working with traversals for the first time and am running into some errors with my them I am just going to post my preorder code because I am gettin the same error for post and in order. The Error: BSTree.h: In member function âvoid BSTree<T>::printPreorder() const [with T … | |
please provide me codes how to construct circular matrix as below 1 2 3 4 12 13 14 5 11 16 15 6 10 9 8 7 | |
How do i print the following number pattern(Triangular pattern) ............1 .........1 2 1 ......1 2 3 2 1 ...1 2 3 4 3 2 1 1 2 3 4 5 4 3 2 1 | |
here is the simple code: [code=cplusplus]#include <allegro.h> #include <iostream> using namespace std; int FindArea(int,int); int main(){ int lenghtOfYard; int widthOfYard; int areaOfYard; cout << "\nHow wide is your yard? "; cin >> widthOfYard; cout << "\nHow lond is your yard? "; cin >> lenghtOfYard; areaOfYard= FindArea(lenghtOfYard,widthOfYard); cout << "\nYour yard … | |
Hi all, When the user enters a word, isKnownWord() checks whether the word is in the dictionary but even when I enter a word which I know is in the dictionary, into the terminal, it always outputs no! Can somebody please explain why it is doing this? isKnownWord in sc … | |
Hello people. I have a favor to ask. My programming challenge is to write a program that uses a structure named movie data to store the following, title, director, year released, running time. this program should create two moviedata variables store values in their members, and pass each one in … | |
I think I master the basics of C++ that good I can move, not all though there are many things still I don't know of course. I've made applications with mysql and made my own little roleplaying game and some calculator like things. Basically noobie like programs with no graphics … | |
Hi All, I'm a beginner in C and C++, and I get a "Stack Overflow" problem when I compile my code. I use visual studio 2008. My code uses some library, that has some header files, and some .cpp files. The library basically helps me in getting a random number … | |
1. Write a C program to read a list of books from a file and create a linked list to store them. The purpose of this program is to keep track of the books kept in a shelf. The shelf is a three-tier shelf and each tier can store up … | |
Hi, I was assigned to study and understand some code and I was told the major problem with the program was poor performance. Here's the bottleneck: A global data set is maintained. This data set is updated regularly. Then there are threads that have to do some processing using a … | |
Hi everyone, please can anyone show me how to show a progress bar while copying a file. I tried using SetTimer() but i does not work the way i want it i.e the file gets copied after the given time has finished. | |
Hi all, can you please help me solve these errors I am receiving: q2.cpp:127: error: expected primary-expression before ‘*’ token q2.cpp:127: error: ‘wordPointer’ was not declared in this scope print function which is contained within the sc class: [code] void printDict(struct wordRecord *wordPointer) { // Code omitted to step through … | |
Hello, I have a question about bitwise operators, especially shifting. Suppose we have: [code=C++] #include <iostream> using namespace std; int main() { unsigned i = 2; i<<=2; cout << i << endl; } [/code] unsigned i = 2 in binary is 0.......00010, if we shift 2 bits to the left … | |
I'm having an odd problem writing some template classes and placing the implementation in a separate .CPP file - specifically I keep getting the following errors: Error 1 error C2143: syntax error : missing ';' before 'List<T>::begin' Error 2 error C4430: missing type specifier - int assumed. Note: C++ does … | |
hello , first i want to say that im very new at c++ , i managed to create a very simple program through searching the internet , this little program involves running a certain exe file with parameters : (e.g: "c:\folder\file.exe" -parameter1 -parameter2) i am using the system() function to … | |
Hi, I've been trying to read the file content from the file path entered by user at run time. However i always end up in error. Help needed... char name[100]; ifstream infile; cout<<"Enter filename to open"; cin.getline(name,100); infile.open(name); if(!(infile.is_open())) { cout<<endl<<"File Not Found"; } i'm not using relative path, instead … | |
okay, i wouldnt be asking for help if i didnt need. im completely stuck and have no idea HOW to fix it. my teacher didnt really teach how to figure out these things, he basically left the last assignment as a "teach ourselves" moment. anyway...whole point of the assignment is … | |
there is something i want to ask about this [code] LPDIRECT3D9 pdirectX9; [/code] I understand this is a pointer but why do we not use the * like this [code] LPDIRECT3D9 *pdirectX9; [/code] when i look over my code it confuses me with a struct EDIT: doing some reading into … |
The End.