51,593 Topics

Member Avatar for
Member Avatar for mybluehair

Hello. For the past 6 months I've been creating a c++ game, but all I have ever learned in c++ is how to write c++ consel. (The DOS screen) Its so ugly and I would really love to turn my game into a c++ API with some basic graphics instead …

Member Avatar for tux4life
0
111
Member Avatar for killdude69

This problem has been bugging me for two days now. I am trying to make a DLL, it exports many classes containing properties, variables, functions and a constructor. I am using VC++ 2005 on Windows Vista Basic. My project is the WGCL C++ control library. It is a mask for …

0
95
Member Avatar for krishnampkkm

Hii I wanna list all the files and folders of a particular drive. Any sample codes available... Give me a link to them... Thanking you

Member Avatar for krishnampkkm
0
107
Member Avatar for timb89

(10 marks) Write a functiom in C++ which when passed 2 different lower case strings s1 and s2 will return true if the strings are anagrams. Note that 2 strings are anagrams if they contain exactly the same letters with the same frequency. im doing a past paper for an …

Member Avatar for kvprajapati
0
172
Member Avatar for Vicky21

There is a cgi code written in C++. Currently there is no session management done in the web pages. There is a need to provide sessions in the web pages so that the user can login, maintain session and then logoff. While this is a fairly simple task in java …

Member Avatar for Ancient Dragon
0
68
Member Avatar for BradenMurphy

Hey:) I'm not actually sure what it's called..so just calling it "mouse window locking" - What i mean by this is how do you lock the mouse to a window ie: The mouse can not leave the window unless you alt tab. So when the user drags the mouse to …

Member Avatar for BradenMurphy
0
2K
Member Avatar for Zcool31

Hello everyone! I am trying to use polymorphism to have a little physics simulator that draws objects to the screen. Each object has properties like mass, friction, position, velocity, acceleration and such similar things, as well as a pointer to a SHAPE object which describes the shape of the object. …

Member Avatar for Zcool31
0
232
Member Avatar for lotrsimp12345

[code=cplusplus]#include <iostream> #include <cstdlib> using namespace std; int main() { cout <<"enter the problemset and number""\n"; //problems represents name and numbers string problems; string problem_name_and_numbers=problems; string numbers; char quote; int total_length=problems.length(); //gather name if(cin.peek()=='"' || cin.peek() == ''') { cin >>quote; getline(cin,problems,quote); int problemslength=(problems.length()+1); int difference=total_length-problemlength; numbers=problem_name_and_numbers.substr(problemlength,difference); } else { …

Member Avatar for lotrsimp12345
0
124
Member Avatar for giora88

Hello. I have a question about socket programming. I am using Linux. I want to establish a connection between a client and a server using the methods: Server: socket(), bind(), listen(), accept(), connect(), send(), recv(), close(). Client: socket(), connect(), send(), recv(). My question is: If I am a client and …

Member Avatar for Salem
0
126
Member Avatar for Niner710

Hi, I am a newbie to C++ and want to know how to parse thru a binary file. I am having some trouble with some simple code. I have a sample binary file(test.bdb) that has "0069 0045 0089 0090" in the file. Here is my code for the file. [code] …

Member Avatar for Dave Sinkula
0
2K
Member Avatar for julia2009

I'm writing a program in C++ under Linux that needs to wait for user to press a key. Considering the key pressed the program will go accordingly. So I must be able to recover the key code from a variable afterwards. I will appreciate a good help.

Member Avatar for ArcRoyal
0
1K
Member Avatar for swati11

Hi, I am creating a dll based VC++ project.I believe I am facing some memory issues. I have checked the code and for every memory allocation by using the new operator I have included a delete operator to deallocate the memory. May be there are some memory leaks which are …

Member Avatar for wildgoose
0
76
Member Avatar for floodemo

what does this code mean/do? Rectangle[] rects = new Rectangle[] { new Rectangle(8,8,119,86), new Rectangle(127,8,119,86), new Rectangle(246,8,121,86), new Rectangle(8,94,119,90), new Rectangle(127,94,119,90), new Rectangle(246,94,121,90), new Rectangle(8,184,119,88), new Rectangle(127,184,119,88), new Rectangle(246,184,121,88) }; formGfx.DrawRectangles(pen, rects);

Member Avatar for ddanbe
0
86
Member Avatar for anirbanjoy

Hi, I have 3 seperate make file where, 1st one generates a static library libCanOpen.a, (using ""ar -r ") 2nd one creates a dynamically linkable library libPixyCANopen.so (using "g++ -Wall -fPIC -shared") and the 3rd one creates the executable by linking it to libPixyCANopen.so. The 1st two makefiles build without …

Member Avatar for anirbanjoy
0
380
Member Avatar for iskhan
Member Avatar for lexusdominus

Im having some problems organising my code in a large (for me) project. Basically my problem stems from having 1400 lines in one source file. Ive written 38 functions which all have declarations above the main function. Below my main function block i have all of the function definitions. Im …

Member Avatar for lexusdominus
0
158
Member Avatar for begnnr_help

I have a problem where I am writing a program that has a predefined costs for tickets. The program asks what city you want to go to and then it asks how many tickets you want to buy and it calculates the cost. If you want more it will ask …

Member Avatar for begnnr_help
0
202
Member Avatar for sparcheta3

Hi guys, I'm new and self teaching myself C++. A problem from the book says to create the CandyBar Struct and the create a dynamic array that hold 3 structures, initialize the structures and output each of them. The code works BUT I'm wondering if there is an easier way …

Member Avatar for jencas
0
140
Member Avatar for Micky Holtern

Hello. I have a strange problem in VS 2008. I have ascii - codes of simbols and I want to have a String^ variable as result of converting. That is my code: [code] int arr[10];//array with ascii codes of simbols. ... unsigned char a; String^ str; for ( int i …

Member Avatar for Micky Holtern
0
99
Member Avatar for seao111

I would like to know the best way to enumerate a network domain and check if the computers within this domain have a certain file on their computer. Code Structure: (1) Program enumerates local network, stores client computers to a string array (2) Program checks all enumerated computers on the …

Member Avatar for jencas
0
103
Member Avatar for Ruan RT

Hi All I am new to C# language and would like to know where I can get my hands on some good examples of C# in Revit. I am not a genies in programming so I will possibly need a book for C# programming for dummies :-) Any information would …

Member Avatar for Ramy Mahrous
0
110
Member Avatar for mathueie
Member Avatar for Nick Evan
0
88
Member Avatar for chaines51

I have a class (String) that I want to be able to implicitly convert to a char. How would I go about doing this? I know to do it the other way around, I just add a constructor that just takes a char as a parameter, but to convert from …

Member Avatar for chaines51
0
173
Member Avatar for gwen73

I am writing a program that uses structure named movieData to store the following information about a movie: Title Director Year Released Running Time (in minutes) The program should create two movieData variables, store values in their members, and pass each one, in turn, to a function that displays the …

Member Avatar for s_sridhar
0
166
Member Avatar for rosiecomsoft

can anyone plz tell me how can we implement hash tables with chaining i mean insertion using link lists! i have to submit it on 22 and i haven't got a clue how to do it!

Member Avatar for csurfer
0
83
Member Avatar for gergep

and it looks like this: [CODE] void Functions(int s) { s += 5; } [/CODE] then can i call it somehow in c, c++, or cocoa something similar to [CODE] void DoSomething(int s) { Function* function = myfile.readFunction(Functions); execute(function(s)); } [/CODE] any help would be appreciated thanks in advance

Member Avatar for gergep
0
132
Member Avatar for vishalonne

Hi Every Body I am new born in C++ I am facing and error for last 3 days I tried my best with all what I knew but FAILED..... Error is - " Linker Error: Undefined Symbol Library::code in module PRGDONE.CPP" I am using Turbo C++ 3.0 of Borland Here …

Member Avatar for monkey_king
0
208
Member Avatar for george_cpp

Hi All, Does anyone know which file manipulation library is faster between c's FILE and c++'s fstream? I would suppose that c++'s fstream would be the faster but I just wanted to see some expert advice/opinion on this. I googled the internet without finding anything concrete. If there is any …

Member Avatar for monkey_king
0
5K
Member Avatar for goody11

For some reason my shutdown function that i'm making won't work. I get this error: In function `void shutdown()': expected `,' or `...' before numeric constant Here is my coding: #include <windows.h> void shutdown(); void shutdown() { BOOL WINAPI ExitWindowsEx(UINT EWX_REBOOT, DWORD SHTDN_REASON_MAJOR_HARDWARE); return; } int main() { shutdown(); } …

Member Avatar for goody11
0
187
Member Avatar for walter clark

From the point of view of a command line programmer (whose been at it for 25 years) what is the difference between MFC and .net?

Member Avatar for Stinomus
0
834
Member Avatar for walter clark

Can someone please correct this... Microsoft is in the best position to answer questions, but they are incapable of saying anything negative about ATL, MFC, Win32 or anything else they invented. Beginners are left with the impression that nothing is better than anything else. Can someone (who is willing to …

0
62
Member Avatar for chandru_shan

Hi Friends, My application crashes with an error saying "Demo Application pk/si component has stopped working". The systems Event Viewer log shows an error with the following details. [B]"Faulting application Demo.exe, version 1.0.0.1, faulting module OLEACC.dll,version 4.2.5406.0, time stamp 0x4549bd93,exception code 0xc0000005,fault offset 0x00004062,process id 0x154c,application start time 0x01c9ee94aab4c550"[/B] I …

Member Avatar for Salem
0
213
Member Avatar for dave49

I'm very confused. I'm suposed to expand this pointer-based list class in this program by setting ListItemType to int then adding methods to find the smallest number, the largest number, and the average of the list. Before I added the findLargest function the program would compile but, when ran, gave …

Member Avatar for dave49
0
255
Member Avatar for catchmrbharath

I am having a problem in implementing of sieve of eratosthenes.. please check the code and tell me the error [CODE] #include<iostream> #include<cstdio> using namespace std; int main() { int i,j; long array[100001]; int count=0; for(i=1;i<100001;i++) { array[i]=i; } for(i=2;i<100001;i++) { if(array[i]!=0) { cout<<""<<array[i]<<endl; int j=0; j=i*i; while(j<100001) { array[j]=0; …

Member Avatar for siddhant3s
0
293
Member Avatar for JurieBurie

PDF virtual printer in c# Hi All I have a small project that someone asked me to do for them and am struggeling quite a lot to get started. Could someone please steer me in the right direction. Here are the requirements: When you are in app such as word/excel, …

0
53
Member Avatar for Clockowl

Hey guys, Can I tell istream to ignore ALL the characters until the delimiter char? It can be done with a loop but it's kinda weird I can't tell istream "discard until this char" imho, so maybe there's an hidden option somewhere. Thanks in advance!

Member Avatar for Narue
0
281
Member Avatar for elisgugu

Hello! I am using BCB and I really need a help I have to fetch the value from each row in a table and I know I have to add a loop,but when I read the buffer-it takes only the firs value in the firs row in the field and …

Member Avatar for elisgugu
0
101
Member Avatar for Sky Diploma

I am confused by the use of an un-named namespace and its practical applications. The C++ Programming Language states that. [code] namespace { //Content } [/code] [b][COLOR="Green"]is equal to [/COLOR][/b] [code] namespace $$$ { //Content } using namespace $$$; [/code] Where $$$ is a unknown and random name. However I …

Member Avatar for siddhant3s
0
110
Member Avatar for cwarn23

Hi, I'm looking for an open source c++ compiler to embed into an ide project I'm working on. I'm using Visual C++ express 2008 and would like to know what you's recommend as I have heard of gcc and MinGW but don't know what is best and EASIEST as they …

Member Avatar for cwarn23
0
379
Member Avatar for rmlopes

Hi all, I am new to threads in c++, and I must use the pthread library. The documentation is easy to understand, but there is a more general aspect that I am missing. My question is: Is it possible to give a pointer to an object's function as argument to …

Member Avatar for rmlopes
0
118
Member Avatar for saalvi

Problem Statement: Writing and Reading student data in a file. Detailed Description: Write a program in which you have to: 1) Create a text file "Student_info". 2) Using Code Write the following data in it: Roll NO Student Name Class 101 Ali Raza BS(CS) 102 Usman MS(CS) 103 Faizan BS(CS) …

Member Avatar for siddhant3s
0
174
Member Avatar for newToC

Hello everyone. I am new to C++ and, I guess trying to pool task that is to advanced. I have a MDI application written in PowerBuilder. One of the child windows in that application has MultiTab control with several tabs on it. What I’m trying to do is to add …

Member Avatar for newToC
0
172
Member Avatar for vishalag

Hi I am using eclipse under ubuntu for my work. I am calling a function with specified arguments. It builds correctly but while debugging it stops at the call giving the error as "no source available for function()" [code] int f1(a1,a2){ //some description here } int main (){ //call f1 …

Member Avatar for vishalag
0
414
Member Avatar for elisgugu

Hello! I am using BCB and I really need a help! I have to fetch the value from each row in a table and I know I have to add a loop,but when I read the buffer-it takes only the firs value in the firs row in the field and …

Member Avatar for elisgugu
0
148
Member Avatar for Zay

[ICODE]#include <iostream.h> main() { int n, k = 5; n = (100 % k ? k + 1 : k - 1); cout << "n = " << n << " k = " << k << endl; return 0; } [/ICODE] How the value of n become "4" ? …

Member Avatar for kvprajapati
0
1K
Member Avatar for krishnampkkm

[CODE]string source; char *src = (char*)(source.c_str()); LPCWSTR lpszsrc = (LPCWSTR)src; Handle h= CreateFile(lpszsrc,.........); if(h==INVALID_HANDLE) printf("Error occured") return 0; [/CODE] [B]The above code segment always shows invalid file handle.I know the reason is my LPCWSTR conversion is not correct.How to make it correct.?[/B]

Member Avatar for krishnampkkm
0
124
Member Avatar for mrnutty

I know that it returns the remainder but what happens when say : x% y, where x,y is int and x<y. I see that results in x; For example, 3% 101232 = 3 and similarly 3%y, where y is greater than 3 yields 3. Why is that> Just wonder the …

Member Avatar for chaines51
0
284
Member Avatar for cruisx

Hi guys, I am making a memory game for my school project and i just have a few things that i would like to add to it to make it better. In my game, i have a 5x5 grid that has letters hidden by $ underneath. So when the user …

Member Avatar for mrnutty
0
181
Member Avatar for star34

Hi, i made a display()function that uses level-order traversal of the tree to display nodes level-by-level.I was told that I needed to put a queue class in my project. the hint was to put the queue in the root, do regular traversal but when we meet the marker, get() the …

Member Avatar for s_sridhar
0
205
Member Avatar for llemes4011

Hi, I have another question. This one is about header files. I have a header for a player and the opponent of my battleship game. They way I have it set up, the opponent needs a player object to make a move, and vise versa. This is what i have. …

Member Avatar for llemes4011
0
155

The End.