48,986 Topics
| |
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 … | |
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 … | |
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 … | |
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*? | |
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 … | |
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:):) | |
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 | |
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 … | |
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 … | |
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] … | |
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, … | |
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 | |
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 … | |
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[] = … | |
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 … | |
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 … | |
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 … | |
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 :) | |
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> … | |
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 … | |
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 … | |
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> > … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.