49,761 Topics
| |
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 … | |
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] | |
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 … | |
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 … | |
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 … | |
[CODE]string subChoice =""; getline(cin,subChoice);[/CODE] Can anybody help me??? What these lines do? and how are to be used? | |
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 … | |
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 … | |
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] = … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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', … | |
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 … | |
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 … |
The End.