49,760 Topics

Member Avatar for
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
565
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
Member Avatar for pawan_sharma777

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 ????????????

Member Avatar for pawan_sharma777
0
95
Member Avatar for kirviepalencia

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 …

Member Avatar for kirviepalencia
0
160
Member Avatar for aviavyne

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 …

Member Avatar for prvnkmr449
0
400
Member Avatar for bmos31

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 …

Member Avatar for bmos31
0
201
Member Avatar for harpay

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). …

Member Avatar for harpay
0
447
Member Avatar for durpderp

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?

Member Avatar for durpderp
0
107
Member Avatar for Empireryan

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 …

Member Avatar for Empireryan
0
185
Member Avatar for Stazloz

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 …

Member Avatar for Stazloz
0
1K
Member Avatar for danijela123

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 …

Member Avatar for Ancient Dragon
0
262
Member Avatar for Ami_m24

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 …

Member Avatar for Ancient Dragon
0
122
Member Avatar for tommyz4

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 …

Member Avatar for Ancient Dragon
0
265
Member Avatar for frogster

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 …

Member Avatar for StuXYZ
0
118
Member Avatar for muze

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 …

Member Avatar for Ancient Dragon
0
135
Member Avatar for rt0026

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 …

Member Avatar for StuXYZ
0
182
Member Avatar for Garrett2011

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 …

0
149
Member Avatar for Rez11

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?

Member Avatar for Rez11
0
168
Member Avatar for vello

[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 …

Member Avatar for arkoenig
0
198
Member Avatar for kutukak
Member Avatar for karthikeyanvani
-1
360
Member Avatar for danalovesc

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: …

Member Avatar for danalovesc
0
100
Member Avatar for kerp

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 …

Member Avatar for kerp
0
1K
Member Avatar for praky
Member Avatar for CrazyDieter
0
71
Member Avatar for vbx_wx

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 …

Member Avatar for muze
0
99
Member Avatar for CodyOebel

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 …

Member Avatar for CodyOebel
0
145
Member Avatar for onako

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 …

Member Avatar for onako
0
221
Member Avatar for namehere05

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 …

Member Avatar for namehere05
0
1K
Member Avatar for utkarsh009

Will the older c++ commands (leaving that of conio.h) work with a new compiler like g++ if i use "using namespace std;" and use 'int' with main() rather than 'void' and don't use .h for including a header file?

Member Avatar for Ancient Dragon
0
76
Member Avatar for Jixz

So Basically I have a 4 x 2 array of Chars* that I need sorted alphabetically by the first column only. The Array starting out looks like: [CODE] Choices[0][0] = "CCleaner"; Choices[0][1] = "Utilities"; Choices[1][0] = "SIW"; Choices[1][1] = "Information"; Choices[2][0] = "MalwareBytes"; Choices[2][1] = "Virus"; Choices[3][0] = "CCleanerx"; Choices[3][1] …

Member Avatar for Ancient Dragon
0
134

The End.