49,761 Topics
| |
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 … | |
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); … | |
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 … | |
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 … | |
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 … | |
i use microsoft visual c++ but i'm unable to execute my graphics program in it is there any solution to over come it???????????????? and can any one have an project of student management system ???????????? | |
ca anyone help me... i am having a problem of my c++ code.. im still a begineer in c++ and i want to creat a program that searches and input an ID number and reading the whole line..this is my sample txtfile Record2.txt 101,Kirviepalencia,500.00 102,ALmond Olilang,700.00 103,Krishna Laguardia,200.00 104,Carl Kabalyero.300.00 … | |
Hello, I got a new problem. Our teacher asked us to create a menu-driven program which will make all types of conversions ([url]http://classroom.sdmesa.edu/vtrinh/pp4.html[/url]). This program must be able to do conversions back and forth (like inches to centimeters, and centimeters to inches). Below I started the assignment and so far … | |
I'm having some problems finding memory management errors in this code. The only one I see as a possible error is the deleting the dereferenced pointer, but I'm not even sure if thats correct. Some of the errors should include memory leaks, memory deletion when still in use, two objects … | |
please help me how i would write these two programs. im learning c++ and am having difficulties, if anyone can help i will greatly appreciate it. Write a C++ program that displays the results of the expressions 3.0 *5.0, 7.1 * 8.3 – 2.2, and 3.2 / (6.1 * 5). … | |
Say I have a class: [CODE]class foo { public: foo(); int len{return 1}; }; [/CODE] Then in main I have a class pointer: [CODE] foo *var[5]; [/CODE] My question is when do class pointers get initialized? Or do they not? How would one initialize them? | |
Hey guys, I think I have a pretty simple fix here, I just need somebody to point out my error. I'm getting a seg fault after writing to an array of char. I need my function to run through the array and find pairs. If every char in the array … | |
Hi! Having some major issues my homework assignment. I have to end this while loop when detecting two consecutive newline escape sequences in a row. This is the word problem: Write a program that gives and takes advice on program writing. The program starts by writing a piece of advice … | |
hi there, im using mfc when i close my dialog box i want to disable mouse move events, so any idea how to do that? i want to do that because i have problems, mouse move event happen before closing dialog box and i dont want that. have no idea … | |
Hi i'm Browsing a file, then showing the contents of file in tree control, i just want that if user wants to browse again a file, then in tree control previous items should be removed and new file items shouls present only can any1 help me, how to do that … | |
Hi, I spent a lot of hours, why this code is wrong. This code compiles good, but execution causes errors (during sorting objects). Environment: (MinGW WinXP or VS 2008) [code] #include <iostream> #include <vector> #include <algorithm> using namespace std; class Edge1 { int v_,w_,weight_; public: Edge1(int v, int w, double … | |
Using this code:[CODE] class box { public: int x; int y; XMMATRIX world; ConstantBuffer cb; cb.mWorld = XMMatrixTranspose( world ); box(int a, int b){x=a;y=b;} };[/CODE] Gives error on "cb"(This declaration has no storage type or class or type specifier. What should i do about this? Is it not possible to … | |
hello guys...if it is simple question plz excuse me... [B]1)[/B] I have a var associated with ListBox (you know adding var to the control in MFC). Now I can access it in one class [B]"MyProgDlg.cpp"[/B] but can't access it in another class [B]"classA.cpp"[/B], why is this so [B]2)[/B] how do … | |
The recently made a change to my code that made it work correctly. I would like someone to help me understand why it works, but it did not work before. [B]Before (not working correctly)[/B] total = (amountPaid - purchaseAmount) * 100; totalInt = total //changes from float to int totalDollars … | |
considering visual C++ compiler, Lets say I've got a file with whatever extension and it contains 100 bytes of data which are exactly the data that I want to initialize an array of char data type with a length of 100 characters with, Now apparently one way is to read … | |
Is it possible to use a string with classes? Even if you are using a class specification file and implementation file? I need to have 3 member variables that need to store a string. Or is an array of characters a better fit when it comes to classes? | |
[CODE]a.cpp: In function ‘int main()’: a.cpp:39: error: no matching function for call to ‘find(int&, int)’ [/CODE] [CODE]#include <iostream> #include <fstream> using namespace std; int minutes, seconds; char temp; int array_l; bool* sees; int* a; int saade; int main() { ifstream sisf("raadio.sis"); ofstream valf("raadio.val"); /* * How many songs? */ sisf … | |
[B]I want to write elevator program. Can you help me. Please... [/B] | |
Hi all, i'm new to Templates and when i tried to implement templates methods which needs to use a map (which is a member in private), the map can only do 3 things: insert, swap, and operator =. and i don't get the full functionality of map.. Here's the code: … | |
Hi I'm currently writing an Othello game using the Windows API. I have 3 classes in my program, the first class is simply called "Othello" and it handles almost everything. I also have a class called Field that's used to control which fields are black which are white etc. My … | |
Is there any good book or any good resource over web. Any ebook ? | |
Why copy remains empty after every assgment in for() ? [code] int main() { const char* c = "abcde"; int size = strlen(c); char* copy = new char[size]; for(const char* p = (c + size - 1); p >= c; p--) { *copy++ = *p; } copy[size] = 0; for(int … | |
Ok I have the Hwnd to a particular window I want to work with. Lets call this windows program the "UNWANTED". This UNWANTED window has two things I wish to identify it by. The first one I already have.. which is it's windows handle! Second.. is what I need to … | |
My file needs to be updated frequently, meaning that new data has to be appended, but in a very specific way. The following is the sample content of my "file.txt" (2 vectors of length 6): [code] 1 2 3 4 5 6 7 8 3 4 5 6 [/code] After … | |
Program descr: Im trying to make a windows manager for windows I might draw in CONSOLE. the plan is to draw manually windows in the console in an objectified way. instead of drawing the windows using console coordinates I create a buffer then use [URL="http://msdn.microsoft.com/en-us/library/ms687404(VS.85).aspx"]writeConsoleOutput[/URL] to write this buffer to … |
The End.