51,593 Topics

Member Avatar for
Member Avatar for digimouse

Hi, this is my first post and I need your help, I need examples of how to use methods in c, that are simple, for example do any math operation with the variables that are part of the class. And, if you can, compare the method of the class with …

Member Avatar for LevyDee
0
115
Member Avatar for Daaa

I have looked around and it seems that there are no comprehensive tutorials on integrating LUA into a C++ application. What exact files must i have/include/link etc? Most tutorials don't describe this in any detail and i am left wondering what i need where.

Member Avatar for Daaa
0
195
Member Avatar for aviles

//Write a C++ program to determine and print the sum of the series ( 1/6 + 1/10 + 1/14 + … + 1/(2*(2*n+1)) )for a given value of n. The value of n should be given interactively through the terminal. (Note: You will only get credit if you use a …

Member Avatar for sfuo
0
181
Member Avatar for yesamin

private: char board[3][3]; // two dimensional array stores current board configuration }; tictactoeGame::tictactoeGame { // set boardConfig[i][j] to be ' ' (the space character) for each i,j from 0 to 2 }

Member Avatar for daviddoria
0
54
Member Avatar for David_Omid

Basic thing which I am currently unable to do with code in Windows Forms: I want to remove a background image from a panel/picture box. How do I set the BackgroundImage to nothing or remove the background in some other way? E.G Early in the code the background is added: …

Member Avatar for madmonkey
0
97
Member Avatar for jalpesh_007

How to implement following C++ program into Java using the file system.. Please help me. please send the java code on <EMAIL SNUPPED> thanking you. [CODE] /*Header Files*/ #include <stdio.h> #include <conio.h> #include "bcio2.h" #include <math.h> #include <stdlib.h> #include <string.h> #include <time.h> /*Function Prototype*/ void sleep(void); void sleep( int nbr_seconds …

Member Avatar for javaAddict
-3
218
Member Avatar for Cyperium

QB64 is a programming language written in c/c++, it is fully compatible with QB 4.5 but with extended modern features and now we would like Galleon (the developer of QB64) to add the ability to call external libraries (dll files). However, Galleon is busy with the compatibility issues with QB …

0
56
Member Avatar for themaestro

[CODE]#include <iostream> #include <fstream> #include <cstdlib> #include <conio.h> #include <iomanip> #include <ctype.h> #include <windows.h> #include <cstring> #include <ctime> using namespace std; int main() { ofstream outputparticulars("particulars.txt",ios::out); int d,a,b,c; char ic[100],password[100],confirmpassword[100]; char info[6][101]; cin>>d; if(d==1) {cout<<"1"<<endl; } else if(d==3) { cout<<" Key in your......\n"; cout<<" First Name : "; cin.getline(info[0],100); outputparticulars<<" …

Member Avatar for themaestro
0
128
Member Avatar for awadojag

Im trying to learn working with text files and I been able to make a program adding text to a text file. However I have no clue how to make it so I'm able to add numbers to the text file. I want the program first ask for the name …

Member Avatar for Fbody
0
101
Member Avatar for emilyhedgecock

Hi I have an array which contains a number and string in each element - itemClass.itemID and itemClass.itemName. the two combined making up an inventory I am trying to build a function which uses a for loop to take each itemID and concatenate them all together to produce a string …

Member Avatar for emilyhedgecock
0
252
Member Avatar for lukename

Hi. I have one silly problem. I'm trying to read from file with [iCODE]ReadFile.read(ReadBuff, 1);[/iCODE] char by char and i need to convert them to ascii code. With normal ascii symbols it's all right. But them i'm trying to convert extended ascii symobl to ascii code it gives me negative …

Member Avatar for lukename
0
132
Member Avatar for davebrown2242

I have to turn in a project in my beginer C++ class in two days time and I am totally stuck. The project is to promt a user for an integer (between 1>=num<1000); Tell if that number is a prime number ( if not find a way to show the …

Member Avatar for garu525
0
177
Member Avatar for aro_kai

i am trying to implement an AI part for the FPS type of game ...heard it is called Aerial Combat game...... my basic idea for the AI portion is that I an going to have two Finite State Machines running simultaneously, one for locomotion or movement decision and another for …

0
67
Member Avatar for neoraghav

Hi, I'm using vc++ 6.0. I used the Date Time Picker Control in the dialog to get Date of birth from the user. Now i want to capture the date of birth and write it to a file. I created a variable for IDC_DATETIMEPICKER as COleDateTime with name m_DateOfBirth using …

0
54
Member Avatar for tagazin

Hello I cannot figure out by myself these errors: error C2143: syntax error : missing ';' before 'using' error C4430: missing type specifier - int assumed. Note: C++ does not support default-int I surfed the web but I'm still stuck; I believe my problem it's with the Windows Headers. I …

Member Avatar for tagazin
0
178
Member Avatar for malvi

Hello I have create my program with mfc. there is text box containing default value 0. if we remove 0 from edit box, it generates error message, "Enter a Number." Can anyone tell me how can i remove this default message box from my program? I am too much frustrated …

Member Avatar for Ancient Dragon
0
539
Member Avatar for unique_13

this is the problem Write a complete C program that can be used as a simple line-oriented t-xt editor. This program must have the following capabilities: (a) Enter several lines of text and store in a data file. (b) List the data file. (c) Retrieve and display a particular line. …

Member Avatar for Ancient Dragon
0
188
Member Avatar for student89

hi i am using visual studio 2008 (c++ express edition )i have a generated code to handle xml parsing and i am trying to use this code in my project so i build a .lib file with these setting under precompiled header *create precompiled header * create\use stdafx.h * precompiled …

Member Avatar for Ancient Dragon
0
131
Member Avatar for Osas106

Good day all am a complete novice to the world of windows socket programing. i recently wrote an application that should help me connect, read, and write to and from socket. thereafter, each time i build the compiler complains of: 1.see the declaration 'getservbyname' 2.see the declaration getservbyport 3.see the …

Member Avatar for Ancient Dragon
0
94
Member Avatar for keweul

//Have to convert digits to words, having problems with the output. Please help. [CODE]#include<iostream> using std::cout; using std::cin; using std::endl; int numToText(int num) //function to return text version of number entered { switch (num/10) //Nested switch, this part detemines if number is multimple of ten { case 1: switch (num) …

Member Avatar for keweul
0
239
Member Avatar for pandaEater

I've been working on getting the Big-Oh notation for this code segment a couple days now and I can't figure it out. I've most likely come across the right answer but I can't convince myself it's right. What's the Big-Oh notation for the following code and how do you arrive …

Member Avatar for gashtio
0
381
Member Avatar for rinkuburagohain

i have two forms form1 and form2 i can able to call form2 from form1 in button click event but not able to call form1 from form2 in click event.. i have included the respective header files also but still not working.

Member Avatar for rinkuburagohain
0
130
Member Avatar for Vllinator

Hi i'm writing a program that reads records from a file, then sorts these records by the person's firstname, and stores the sorted data in a new file. Heres the code: Everything works fine, except it stores garbage at the end of the last record. If i set the array …

Member Avatar for Vllinator
0
143
Member Avatar for simple dude

Hi. I know some simple plain C++ and have even learnt some basics of MFC programming in Visual Studio.I can create simple desktop applications now. But the problem basically is that,I feel all that I have learnt is messed up.I learnt some flash actionscript,C++,then left programming itself for a long …

Member Avatar for simple dude
0
137
Member Avatar for dfxover
Member Avatar for 4824hbk

Ok so I have do a code in C++. The pattern appears to start off by adding one, then count by twos and go back to counting by one. Then count by 4s, back to one and then multiply by 2. What exactly is the pattern? * 1 2 3 …

Member Avatar for csurfer
0
89
Member Avatar for burcin erek

i found msoftcon.h on the book and added. when i run below program on dev c compiler linker error undefined reference to set_color(color,color) linker error undefined reference to set_fill_style linker error undefined reference to draw_circle linker error undefined reference to init graphics [CODE]#include <cstdlib> #include <iostream> #include <msoftcon.h> using namespace …

Member Avatar for burcin erek
0
523
Member Avatar for cpt clueless

Ok my project is to make several shapes that are all controlled by the user as far as what size and character is used I have the parallelogram, rectangle, triangles and the even diamond. But I cant get the odd diamond. I can only use the libraries that are in …

Member Avatar for cpt clueless
0
126
Member Avatar for ghingghing

we have a project on our finals and we need to make a program of payroll using menu with the output of employee name, update employee record. display employee record, delet record and exit in the main menu. .we are using the c++ program. .hope u can help me thank …

0
46
Member Avatar for neoraghav

The following code swaps values between 2 variables without using a temp variable..... i want to know the logic behind this [CODE] //#include "stdafx.h" #include<stdio.h> int main(){ int a =3, b=5; a^=b^=a^=b; printf("%d" "\n" "%d",a,b); return 0; }[/CODE] [CODE]Output 5 3 [/CODE]

Member Avatar for neoraghav
0
4K
Member Avatar for Ancient Dragon

I previously posted an MS-Windows example program about how to recursively search folders and create a list of their filename. This program is similar in concept but is for linux. It c++ and uses std::string and std::vector classes to hold the strings. When the program encounters a directory it will …

Member Avatar for Ancient Dragon
0
964
Member Avatar for bmos31

I'm trying to solve a maze that originally chooses moves randomly, keeping track of its last move...left and forward, right and foward, and forward, and by chance will choose to 'undoMove' if a 'moveBlocked', but not guaranteed. I am attempting to use a stack to solve. according to instructions the …

Member Avatar for bmos31
0
1K
Member Avatar for mitrious

I created this function(it works if I put all this into the program) but I can't seem to use the value I get there (the size of a string) in my program... how can I call it and use the values I calculated here [code=c]string::size_type ssiz(const vector<string>& sz) { typedef …

0
60
Member Avatar for kuchick32

I am told to write a definition after the main program that takes numbers from the keyboard and stores them in an array. I'm slightly confused on how to do this step. Help would be majorly appreciated. This is what I have so far with the program. [code] #include <iostream> …

Member Avatar for kuchick32
0
101
Member Avatar for cchase36

I am trying to loop through a polynomial using the iterator from the STL but it says i am dereferencing the iterator somewhere but i can not spot it. I have pin pointed the error to the return of the following code. [code=c] Polynom& Polynom :: AddPoly( const Polynom &a) …

Member Avatar for mrnutty
0
50
Member Avatar for shahanakazi

Hi.. Here is a program about determining the total number of green-necked vulture eggs counted by all conservationists in the conservation district. The program in fact works correctly but there is a line which i am not being able to understand its use in the program and it is the …

Member Avatar for vidit_X
0
230
Member Avatar for hockeygurl35

I'm working on an assignment where we are to implement an address book that holds standard information (ie. Name, Address, City, State, Zip) and contains a user interface to provide options to add, delete, or modify records, search for a specific record, or display all records. These operations are to …

Member Avatar for hockeygurl35
0
191
Member Avatar for dspjm

I am a beginner in c++, I taught myself c++ through the book "c++ primer plus", it really took me a lot of will to finish the book. Now i just want to use the thing i learned to do some pratical things in my life, can anybody tell me …

Member Avatar for iamthwee
0
151
Member Avatar for Beancounter5

helllo, i've got a problem with the code below. I think the problem lies with the const command . I understand you have to use const_iterator with variables that are passed as const. However in the code i->printSummary() it reports a problem? I've been reading about the const command and …

Member Avatar for mike_2000_17
0
93
Member Avatar for canadianpanda

Hello, I am new to C++ and I am trying to create a program but I am not sure where to start exactly. Program purpose : Person/Player is asked to enter a number between 1 and 100. The computer randomly guesses a number and the player says whether its (h)igher …

Member Avatar for gerard4143
0
97
Member Avatar for Dani

You might find this a bit silly, but could someone please explain to me how to do C++ templates? I know they're very simple ... I just never learned them nor ever had a teacher who taught them or even made mention of them.

Member Avatar for phfilly
0
457
Member Avatar for vavazoom

I am trying to extract data from a 1.5 GB text file. The problem occurs when the program tries to open the large text file. It works perfectly on smaller files. Does anyone know how to successfully open a file of this size? Or, is there a better way to …

Member Avatar for Ancient Dragon
0
219
Member Avatar for mitrious

I "miss wrote" the name of the book ... sorry ahhaha accelerated hhahah why did I write advanced ... damn =S ahha 4-2. Write a program to calculate the squares of int values up to 100. The program should write two columns: The first lists the value; the second contains …

Member Avatar for daviddoria
0
149
Member Avatar for kapoorvarun23

hi guys.. m thinking to make a project on resume management system.. pls suggest me some features that i can include in my project... Regards Varun

0
51
Member Avatar for vavazoom

I am trying to extract data from a 1.5 GB text file. The problem occurs when the program tries to open the large text file. It works perfectly on smaller files. Does anyone know how to successfully open a file of this size? Or, is there a better way to …

0
107
Member Avatar for maharjun

i have just observed this wierd thing with visual c++ the following is my code.[please forgive my poor C++ standard. im using it only because im doing it 4 a school project and the examiner wont be bright enough to understand what iss not in the syllabus. this is sad …

Member Avatar for Narue
0
122
Member Avatar for kirvie

i have a problem with my program it can only search 1 account number at a time... and after i search again... it will not display the search number... hope someone can help my with the missing parts of these program.. tnx in advance... goal: to search id number more …

Member Avatar for csurfer
0
160
Member Avatar for kirvie

i have a problem with my program it can only search 1 account number at a time... and after i search again... it will not display the search number... hope someone can help my with the missing parts of these program.. tnx in advance... goal: to search id number more …

0
70
Member Avatar for darkAngel

as above. [code] string s; cin >> s; [/code] for example, if the user enters Orange, i want it to convert to orange. please advise what i should do. thanks in advance

Member Avatar for bbman
0
902
Member Avatar for Arthas

Hi. I am using boost.threads with SDL. Am using vc++2010. I have wrapped the SDL input functions in a class SDL_Input. eg. [CODE]class SDL_Input { public: bool* GetKeyState(); void ProcessEvents(){ static SDL_Event event; while(SDL_PollEvent(&event)) { switch(event.type) { case SDL_KEYDOWN: keystate[event.key.keysym.sym] = true; break; //and all cases as mousebuttonup....so on } …

Member Avatar for Arthas
0
139

The End.