49,761 Topics

Member Avatar for
Member Avatar for jarrax

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* …

0
64
Member Avatar for atch

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 …

Member Avatar for atch
0
114
Member Avatar for mathavan2009
Member Avatar for VernonDozier
0
80
Member Avatar for arunplr

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 …

0
44
Member Avatar for cokaznsyco72

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 …

Member Avatar for cokaznsyco72
0
182
Member Avatar for 143wena

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..

Member Avatar for Nick Evan
0
157
Member Avatar for goody11

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, …

Member Avatar for goody11
0
680
Member Avatar for TheSilverFox

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, …

Member Avatar for TheSilverFox
0
103
Member Avatar for vedybird

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) { …

Member Avatar for mrnutty
0
126
Member Avatar for madmath

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 …

Member Avatar for mrnutty
0
3K
Member Avatar for kylelyk

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(); } …

Member Avatar for mrnutty
0
111
Member Avatar for qkslvr1621

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 …

Member Avatar for mrnutty
0
110
Member Avatar for lancevo3

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 …

Member Avatar for lancevo3
0
107
Member Avatar for bharatsinh

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

Member Avatar for mrnutty
0
140
Member Avatar for valmiki

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

Member Avatar for mrnutty
0
91
Member Avatar for kylelyk

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 …

Member Avatar for kylelyk
0
163
Member Avatar for Aphrodite

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 …

Member Avatar for tux4life
0
146
Member Avatar for mandofl

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 …

Member Avatar for mandofl
1
7K
Member Avatar for Silvershaft

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 …

Member Avatar for Dave Sinkula
0
89
Member Avatar for amegahed3

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 …

Member Avatar for Dave Sinkula
0
148
Member Avatar for funjoke88

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 …

Member Avatar for chili5
-1
147
Member Avatar for dumrat

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 …

Member Avatar for Salem
0
98
Member Avatar for huzeifa

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.

Member Avatar for Ancient Dragon
0
105
Member Avatar for Aphrodite

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 …

Member Avatar for Aphrodite
0
97
Member Avatar for slatk3y

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 …

Member Avatar for slatk3y
0
132
Member Avatar for Shaitan00

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 …

Member Avatar for Tom Gunn
0
339
Member Avatar for hashinclude

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 …

Member Avatar for epitalon
0
181
Member Avatar for shazzy99

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 …

Member Avatar for shazzy99
0
176
Member Avatar for xiikryssiix

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 …

Member Avatar for cgeier
0
104
Member Avatar for J@ckel

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 …

Member Avatar for thelamb
0
142

The End.