49,757 Topics

Member Avatar for
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
184
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
171
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
575
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
121
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
242
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
224
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
457
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
Member Avatar for CodyOebel

Ok, I have code that needs to forever loop, and process. My code in the windows procedure has a case WM_LBUTTONDOWN: . I left click on the client area of the window and it processes the code accordingly. Now so that it keeps processing code at the end of the …

Member Avatar for LevyDee
0
165
Member Avatar for pawan_sharma777

i make this project what i unable to use file handling[CODE] #include<iostream.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<stdio.h> #include<string.h> #include<fstream.h> #include<ctype.h> #include<bios.h> #include<ctype.h> int menu(int,char a[25],char b[25],char c[25],char d[25],char e[25],char sl1[2],char sl2[2],char title[40],char under[2]); void lbyl(char a[50]); void main_menu(); void student_menu(); void mark_menu(); int records=0; void lbyl(char a[50]) { int l,i; l=strlen(a); …

Member Avatar for nbaztec
0
149
Member Avatar for emko

Hi, I would like to get some suggestions on how to change this program from array to vectors. This program reads an ASCII input file and outputs the character frequency into a text file. I got it to work with the arrays, but I can't figure out where to do …

Member Avatar for emko
0
149
Member Avatar for harpay

Write a C++ program that creates an invoice for a small fruit vendor named “Bob’s Fruits”. The fruit vendor sells three kinds of fruit: oranges, apples, and bananas. Oranges cost .90 each, apples cost .65 each and bananas cost .70 each. For each type of fruit the program should ask …

Member Avatar for nbaztec
0
564
Member Avatar for kk33

Hi all, here is my code to find the LoadlibraryA address from an exe, I want to write the return value to text file , but I cant figure out how to do that.Any help would be greatly appreciated. [CODE] #include <windows.h> #include <tlhelp32.h> #include <iostream> #include <conio.h> using namespace …

Member Avatar for kk33
0
222

The End.