49,761 Topics

Member Avatar for
Member Avatar for Kanoisa

Hi guys, Im working on a small console app to seek out all those pesky and disk consuming .ncb files and debug folders left from VS and destroy them so the space i need to backup the files is considerably reduced. I have got my recusrion algorithm to scan as …

Member Avatar for Kanoisa
0
2K
Member Avatar for alexchen

How can I move bitmap using time. Suppose I press Key_right. A square must move 10 pixel/second. How can I solve it? [CODE] #include <iostream> #include <fstream> Bitmap*square; [/CODE]

0
56
Member Avatar for |hex

how would i be able to make sure the user inputs the correct data. for example, if i wanted a command in my code to be run (filename). how can i display a message if the user forgets to add the name of the file or the 'filename'. i hope …

Member Avatar for |hex
0
366
Member Avatar for neoraghav

Hi, I want to create a log file that captures all the actions happening...anyway i got code for that from internet. Now what i want to do is, make that [COLOR="Red"][U][B]file read only[/B][/U][/COLOR] so that the data is not modified by external application or user. [code=c++]log(char* msg) { time_t now …

Member Avatar for neoraghav
0
2K
Member Avatar for johnray31

Hello Guys, I am new to C++ , I was trying to create a map key that contain multiple attribute and i write my own compare function. But i am getting strange output with that may be my compare conditions are not right? I write code as below [CODE] #include …

Member Avatar for mitrmkar
1
124
Member Avatar for Exile_082

[CODE]string subChoice =""; getline(cin,subChoice);[/CODE] Can anybody help me??? What these lines do? and how are to be used?

Member Avatar for Fbody
0
186
Member Avatar for bmos31

I think I'm there, but I'm not sure if the insert() is correctly doubling the dynamically allocated memory. In an attempt in my insert() I tried to: 1 double the allocated memory (not sure if that was accomplished) 2 copy original values to the newArray 3 free original space 4 …

Member Avatar for bmos31
0
1K
Member Avatar for chun0216

Hello, I am trying to optimize or make my code faster and I am not so sure how. So I have two level nested for loop and inside there, I assign value to the array. For example, [CODE=c]tmp[0]=*ptr; tmp[0]=100;[/CODE] I found out that the second one is faster than the …

Member Avatar for kes166
0
108
Member Avatar for alexchen

How can I create the map size, [CODE] #include <iostream> #include <fstream> #include<string> using std::ifstream; bool msize(int Height,int Width){ //add code return true; } bool draw_map(char* Filename,int Width,int Height){ if(Width<1||Height<1) return false; msize(Height,Width); ifstream file; file.open(Filename); if(file.is_open()){ while(!file.eof()){ for(int x=0;x<Height;x++){ for(int y=0;y<Width;y++){ if(c!=']'){ file >> map[x][y]; file.get(c); }else map[x][y] = …

Member Avatar for daviddoria
0
172
Member Avatar for fire_

Hello. I'm creating a program with dialog editor. How can i set bitmap on button? I set bitmap at properties to True. I tried to search on google but i could only find how to set bitmap on button created with CButton. Thank you

Member Avatar for mitrmkar
0
579
Member Avatar for muze

hi guys...when we have used Sleep() function, then how can we get out of this Sleep() function....Lets suppose we have used Sleep() for 10 minutes and I want to terminate the prog after 2 mins, here is the situation im using [code=c] someFunc(); printf("\nProg will not terminate for next 5 …

Member Avatar for muze
0
126
Member Avatar for Davidm44

Well, I've recently been getting into developing drivers, so I thought I should make a class to programmatically start services. But of course, I ran into some trouble on the way, as usual. I'm using StartService to start it, but for some reason it just hangs, I've done some research …

Member Avatar for Davidm44
0
70
Member Avatar for samm22

My professor has given me the code and I wanna run it. I use Visual Studio2008. Code contains data structure "queue". He defines one queue as "queue<int> Q;" But my compiler gives an error and says "error C2065: 'queue' : undeclared identifier" Do we need any separate header file to …

Member Avatar for Fbody
0
256
Member Avatar for TayKaye

I am needing help figuring out how to get this program to function correctly. The program is developed in order for a user to type in any number and it will tell if the number is prime or not. This works, however, I cannot figure out how to get it …

Member Avatar for caut_baia
0
145
Member Avatar for gunbuster363

I am studying further about C++ and come across a topic which describe method to avoid multiple inclusion of header file, which may cause compilational problem. But I never seen such problem, I've tried to mimic the situation with the below files in Visual C++ 2008 express, no error prompted …

Member Avatar for gunbuster363
0
1K
Member Avatar for burcin_erek

regarding with islower() argument, I tried to make a script when I enter the letter with lower case, program detects it and told me that but how i used if else loop but something is wrong, error is seen on islower? my program [CODE]#include cstdlib #include iostream #include conio.h #include …

Member Avatar for burcin_erek
0
80
Member Avatar for chun0216

Hello, I am trying to run a program that uses raw file as an input file and then use a function that requires input file data into uint8_t array type argument. The problem is that when I use the sample input raw file, it works perfect but when I use …

Member Avatar for chun0216
0
135
Member Avatar for nimaid

Hello. I'm kinda new to C++ and want to play two beeps through the system speaker (PC) (Using Beep() of course) at the same time for a song I'm working on. I heard about multithreading, but, as i am only slightly experienced in c++, am having trouble understanding it. Could …

Member Avatar for Fbody
0
243
Member Avatar for hsquared

i was able to make an add functin for a binary tree. in my code, i am able to add a string for the name, university and and int value for an id. now, i need help being able to search the binary tree for a specified id, then return …

Member Avatar for chiwawa10
0
102
Member Avatar for pradeey

hello there I was wondering how would we print numbers like xxxxxxxx.xxxx using cout? I know we can use setprecision() to get the decimals right to the dot. But i am looking to print the numbers left to the dot.ex: 00000012.12345 is there a way that i am unaware about …

Member Avatar for vidit_X
0
89
Member Avatar for jalpesh_007

As i am new to use mouse interface in c. Please tell me how can we check mouse is connected or not. How can we get co-ordinate from computer screen when we clicked it. i just want that how can we store co-ordinate of screen in variable when we clicked …

Member Avatar for Stefano Mtangoo
0
359
Member Avatar for Peter_morley

I'm having trouble displaying a string and integers through the use of stringstream. The code below displays fine as is but say I put in << endl after name. When I compile this it only displays the name string and thats it. If I add a space in any of …

Member Avatar for Peter_morley
0
235
Member Avatar for ramkumar0022
Member Avatar for eduard77

I have an exercise again and I got blocked again. The exercise is: Daphne invests $100 at 10% simple interest. That is, every year, the investment earns 10% of the original investment, or $10 each and every year: interest = 0.10 × original balance At the same time, Cleo invests …

Member Avatar for eduard77
0
226
Member Avatar for jasleen12345

this is a program that my teacher gave me in the class. but i didn't understand it....please explain it to me step by step... [code= c++] #include<iostream.h> class queue { int element; queue* next; public: queue* enqueue(queue*,int); queue* dequeue(queue*); void queue_display(queue*); }*head,*tail,object; queue* queue::enqueue(queue* head,int key) { queue* temp; temp=new …

Member Avatar for Ancient Dragon
0
120
Member Avatar for emilyhedgecock

Hi I have just written this code (am just starting out with c++ so took a while :s) Works fine.... untill character 2 is created. When the program is run the character 1 is fine and every time the users is asked "Please enter x" they can and it is …

Member Avatar for emilyhedgecock
0
458
Member Avatar for Tusike

Hi! I have a program in FreeBasic that helps study words; sort of like a flash-card program. I want to send it to my friends, but they have hungarian keyboards, and I can't figure out how to detect a few things using that keyboard (e.g. the letter í has no …

Member Avatar for Ancient Dragon
0
129
Member Avatar for Krokcy

Hey! I just startet fildeling around with c++ a week or so ago. I have some experience in Java and python. Anyways, i wanted to make this simple hangman game; [code] #include <cstdlib> #include <iostream> #include <string> #include <fstream> using namespace std; void exit(int exitcode); char hus[] = {'h', 'u', …

Member Avatar for VernonDozier
0
1K
Member Avatar for Philosophy

First off, I do want to state that I have read the forums and have not found an issue directly regarding this exact problem, though it is possible I may have overlooked it or something and if so please just point me in the right direction and I will leave …

Member Avatar for Philosophy
0
174
Member Avatar for Panda.

I was wondering how I could start to program. I have looked up some information on the topic and it seems that C++ would be the most usefull to learn. However as it seems a complex thing to learn I was wondering if there was another language to learn first …

Member Avatar for Nathaniel10
0
106

The End.