48,986 Topics

Member Avatar for
Member Avatar for valestrom

Hey, I was just wondering how I can get it so when I click a button it opens my second form. But sets some of the labels to a specific thing, so I don't end up making 170+ forms for my periodic table application. Just like so when I click …

Member Avatar for triumphost
0
200
Member Avatar for akhlakeng

how to do this? : ask the user to insert the length of two sides (b and c) of a tringle and the angle between them in degree (x), compute and print the length of the third side,a, by using this formula a^2=b^2+c^2-2bc(cos(x)) (Note: to use the cosine function(cos), the …

Member Avatar for WaltP
0
255
Member Avatar for Getenks

I dug a lot around the internet to find a .Chr Editor/Opener .CHR file I pointed refers to the one Borland Made. It is a Character Set File or more like a Font file.. Turbo C++ uses this file format. I was hoping if anyone could help me find its …

Member Avatar for WaltP
0
27
Member Avatar for jaepi

Hello there, I have here a problem with the function open(). Since its first parameter asks for a char*, how would i convert wchar_t* to char* if my program asks for a wchar_t* as its path rather than char*?

Member Avatar for epolgar
0
10K
Member Avatar for clide890

Effective January 1st of each year, Gabriela receives a 5% raise on her previous year’s salary. She wants a program that calculates and displays the amount of her annual raises for the next three years. The program also should calculate and display her total salary for the three years. Annual …

Member Avatar for Fbody
0
356
Member Avatar for vishwanath.m

hey guys!!! iam just working on speed of the codes.. and i just want to extract the last bit of the given variable.could u help me??? note:dont extract the bits by dividing it by 2:):)

Member Avatar for vishwanath.m
-1
126
Member Avatar for imolorhe

What are the possible uses of the bitwise operators. i.e. bitwise AND, bitwise OR, bitwise XOR, shift right, shift left and complement. Also, what are the applications of bitwise operators in everyday problem solving. Examples would be nice. Thanks in advance

Member Avatar for daddymummy
0
220
Member Avatar for akhlakeng

Write a program to calculate the power consumed by a heater. This program also calculates the resistance value for the heater. The program’s design should use main that calls the three functions described below: a) getData : Read data from the keyboard. This function is to use reference parameters (pass-by-reference …

Member Avatar for akhlakeng
-4
333
Member Avatar for cypherscouter13

I try to run the following, but I keep getting the error "error C2664: 'Card::SetName' : cannot convert parameter 1 from 'const char [23]' to 'char'" I also got the following error; error C2664: 'Beginning' : cannot convert parameter 2 from 'std::vector<_Ty>' to 'std::vector<_Ty> &' I'm not that familiar with …

Member Avatar for cypherscouter13
0
161
Member Avatar for opawix

Hello ma'am/sir any help for the codes of input to be align.heres my code: [CODE] #include<iostream> using namespace std; int main() { float pre, mid, semi, final, total; cout << "Prelim: "<<setw(20)<< "Midterm: "<<setw(20)<< "Semifinal: "<<setw(20)<< "Final: "<<setw(20)<< "Final grade: \n"; cin>>pre>>mid>>semi>>final>>total; total = (pre+mid+semi+final)/4; system("pause"); return 0; } [/CODE] …

Member Avatar for namratag
0
99
Member Avatar for Powerponken

Hi, This is probably some basic knowledge but I haven't found it out. I have this snippet of code that is causing me problems: [CODE] HANDLE hFile; char lpBuffer[100] =""; char idBuffer[100] = ""; DWORD ofs; strcpy(lpBuffer, fingerprint); strcat(lpBuffer,"\0"); hFile = CreateFile(buffer,GENERIC_READ|GENERIC_WRITE,FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL); WriteFile(hFile,lpBuffer,sizeof(lpBuffer), &ofs, NULL); strcpy(buffer,""); if(ReadFile(hFile, …

Member Avatar for Ancient Dragon
0
179
Member Avatar for hariharan89

Hi , I am a newbee to visual c++ 2008, I have to include a RTP prtocol library JRTPLIB into visual c++ 2008. could any one please brief the steps to do it. I dont know how to include these libraries into visual c++. with regards, Hari

Member Avatar for MonsieurPointer
0
108
Member Avatar for jonnyboy12

Hello. I am i'm recently taking off in building a game. The problem at the moment, is that i fear i'm programming to much! I wouldn't know this because i'm new to c++, but how much code is too much for a modern processor? In my engines render loop i …

Member Avatar for sundip
0
195
Member Avatar for Tom_Weston

What i basically want is more than one character to be found. If h and a are in the string then it will print it. But it will only work if there is a single char. [CODE] #include <iostream> #include <stdio.h> #include <string.h> int main () { char str[] = …

Member Avatar for MonsieurPointer
0
111
Member Avatar for clide890

Hello, I've been having problem with this problem since yesterday and i just recently started C++, so please don't judge. I have very confused to what the question is asking and how the C++ program will look like. Effective January 1st of each year, Gabriela receives a 5% raise on …

Member Avatar for WaltP
0
213
Member Avatar for crane476

I am writing a program that should allow the user to enter however many payroll amounts they want for 3 different stores. It should then display the total payroll for the three stores. The first time through the loop is fine but the second time through, even though it appears …

Member Avatar for crane476
0
109
Member Avatar for George_91

My first thought was [CODE] int size = 0; cout << "Enter size of the array" << endl; cin >> size; int a[size]; [/CODE] Now I know that an array has to have a constant value, but I need that the user enters an integer and use that integer as …

Member Avatar for gerard4143
0
155
Member Avatar for glut

Hey, I need to make a function that returns an array. How would I do so? And how would I make a variable that gets all the values in that function? Thanks, you guys :)

Member Avatar for sergent
0
273
Member Avatar for George_91

I've this quicksort code, and it compiles. The thing is, I don't know how to give random values (integers) to the vector. The program should ask for the vector's size and then create the x random integers so it can apply the quiksort method. [CODE]#include "stdafx.h" #include <iostream> #include <vector> …

Member Avatar for George_91
0
2K
Member Avatar for digipak

Hello, I have a class Pdisk [CODE] class Pdisk { public : Pdisk(string diskname, int numberofblocks, int blocksize); private : string diskname; int numberofblocks; int blocksize; }; [/CODE] Now I want to make a class filesys which can access an object of class Pdisk. I am not sure how to …

Member Avatar for StuXYZ
0
503
Member Avatar for TheChosen0ne

Hey guys, I need some help. I'm using Microsoft Visual C++ 2010. I've heard about being able to write html in c++ I found a few tutorials but I can't understand them they're not very noob friendly. :( Can some of you guys give me a few codes so I …

Member Avatar for Moschops
0
136
Member Avatar for cypherscouter13

I keep getting these error messages: "error LNK2019: unresolved external symbol "void __cdecl MainPhase(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > *)" (?MainPhase@@YAXPAV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@@Z) referenced in function _main" "error LNK2019: unresolved external symbol "void __cdecl DrawForKaiba(class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > …

Member Avatar for sfuo
0
250
Member Avatar for ucdbrummy

I'm new to this site and am desperate for help. I'm learning C++ for university, and have just received my second project. it goes like this: Write a program in which: A random integer between 0 and 500 is generated at the beginning. The user is asked to guess the …

Member Avatar for ucdbrummy
0
73
Member Avatar for xenan

hi can someone helped me in my triangle ><? my prof told me to make a program that ask the user to input the height of the triangle and the user must be able to input the height.. and the triangle must be a triangle not a right triangle.. this …

Member Avatar for gerard4143
0
131
Member Avatar for DriftingFable

Hello Daniweb, I am a student in my CSC 194 using Visual C++ 2008. I am designing a program according to these standards. Most of my knowledge is strictly textbook information so bare with me. [QUOTE]Imagine you are developing a software package that requires users to enter their own passwords. …

Member Avatar for DriftingFable
0
473
Member Avatar for matt_570

Hey I have this tough assignment that just keeps on getting harder and harder. I have 3 more functions to complete. Function1: I have to print the positions of the three consecutive values that have the largest average. If more than 3 consecutive values have the same average, print the …

Member Avatar for pratik_ghulaxe
0
1K
Member Avatar for vlaskiz

As you may guess I'm pretty new to c++. I'm asked to write a program which would read and out put data files. Now im halfway through (that's why I'll ask you not to mind lots of what is on current code) but I'm stuck on this certain error for …

Member Avatar for vlaskiz
0
293
Member Avatar for rcowboy

Hello all, I'm getting an error in the following code, and I can't figure out why exactly. Error is as follows: no match for 'operator>>' in 'scoresIn >> scoresArray' this is at line 28 on the code below. I'm trying to bring in some data from a text file into …

Member Avatar for rcowboy
0
187
Member Avatar for Zssffssz

Well when I run my program the bar at the top says C:\programing\C++\Test\Test.exe (<<just an example) How do I change this? And how do I make the console window look more XPish (I heard it was called luna). Answer the title one first please. I wnt this too be all …

Member Avatar for NathanOliver
0
419
Member Avatar for Tom_Weston

So example.txt contains this; [B]The Man Walked Into The Forest[/B] What I would like is for it to show, what line the word "Walked" is on. [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; string word = "Walked"; ifstream myfile ("example.txt"); if …

Member Avatar for Tom_Weston
0
83

The End.