49,761 Topics
| |
Hey everyone... I need some help...please... Using the web browser control, I want to navigate to a URL and move my mouse over ANY element on that website and have a focus rectangle display around it... I've written a whole bunch of code but none of it seems to work … | |
I want to know the differences in between two? also is this code equivalent [CODE] char ch; FILE *fin; ch = fgetc (fin); [/CODE] [CODE] char ch; ifstream fin; fin>>ch; [/CODE] | |
Hi everyone, I'm doing a little project after a long period of no c++, so please forgive me for any possible stupid mistakes. Basically I have 2 cpp files, in first.cpp I define namespace 'myNS', and in second.cpp I define class 'myClass'. The problem is that I have a pointer … | |
Hi! i was wondering how I could make sure that the user inputs the proper values in my code. I've been looking online and seen things like cin.good() and cin.fail() but the explanations aren't really straightforward and a little confusing. I was wondering if anyone could help me implement the … | |
this is the program #include <iostream> using namespace std; int main() { int digits; cout<<"Enter 10 digits wether positive or negative: "; cin>>digits; //i dont know what to use so that i can separate positive and negative numbers and display it on screen.. //help me pls.., } | |
so i wrote this small piece of code. it simply waits for the user to enter a command, and then, depending on the command, a different message appears. when i enter the simple words like debug and execute, it does what i want it to do. now, when i try … | |
Hi I want to build some objects that have a little difference between them. But i wonder how would i do it - 1. build a class with some variables and build objects out of him, or - 2.build class for each object, with the functions dedicated to this 'only … | |
I'm trying to write a code for class and after compiling the first half with g++, just make sure it'd work so far, I get all these errors. After looking them all up I don't understand why i'm getting these errors or how to fix them. If anyone could please … | |
Hi everybody! I must make program in c++ that reads unknown number of words from a text file to char arr which after that i will have to sort the words by the first letter by alphabet in a stack. can any body help me please? txt file: den rock … | |
i m in A csc class in college. And everytime the prof. Gives a lab i have a hard time starting it i always neeed some classmate to help me start it ... Any ideas on how i should approach the labs | |
I have been trying to build POCO library for few days but i have been unable to. When I try to build the foundation library from my vc++2008(i have windows 7) it gives the following error: >>>>>>>>>>>>>>> Performing Custom Build Step Project : error PRJ0003 : Error spawning 'cmd.exe'. Project … | |
[CODE]/* Name: Copyright: Author: Date: 14/09/10 21:17 Description: */ #include<iostream> #include<istream> #include<ostream> #include<string> int c_f_fraction(); int c_f_decimal(); int c_f_percent(); int convert_to(); int convert(); int help(); std::string convert_code(""); float c_f_fraction_1(0); float c_f_fraction_2(0); float c_f_result(0); float c_f_decimal_1(0); float c_f_percent_1(0); int help_code(0); int main() { std::cout << "\nWhich would you like to convert, … | |
I am getting this error when trying to use a constant defined in a class in one file as an array size in a different file. I am using MSVC 2008. Here is my code. .h: [CODE] #ifndef GLOBALS_H #define GLOBALS_H #include "stdafx.h" class GlobalVars { public: GlobalVars(); static const … | |
Hi, everyone! I'm in search of an associative container that does not need an implementation of operator< for the key type. std::map and std::set requires that, so I think that I need another kind of associative container. I can always implement my own contained using a vector of pairs, but … | |
Consider the following code: [code] const int con = 100; int &ref1 = 10; //Where is this 10 stored? int &ref2 = con; ref1 = 20; ref2 = 90; cout<<ref1<<con<<ref2; [/code] This outputs: 20 100 90 My only queries are: a) Where is the hard coded number 10 stored? b) … | |
Friendz Please help me out. I want to write a program that can open a program, whose .exe file is stored in my desktop at a particular location. | |
Recently I was assigned to create a program driven by a main menu, followed by a submenu, followed by functions. Below is an attempt of mine, which does display the main menu, and from there a user must enter a value to proceed to a second menu, however it doesn't … | |
Hey, I'm a beginner in C++.. I know the basics.. I want to learn more about it.. Can u please tell me how to use 2d pointers in C++.. If possible just give me a simple program which can read & display a matrix.. :) | |
So I'm looking to create a function that prompts the user to enter 'Y' for "Yes restart the program" and 'N' for No, do not restart. I know this should use the boolean operator, I'm just unsure as to how to implement it. I also know to encase the body … | |
Hi, The following code is for traversing the linked list: [I]node[/I] is a [I]structure[/I] and [I]next[/I] is a pointer to next node declared in [I]node.[/I] [I]start[/I] is the pointer to the first node. [CODE] node* temp = start; while(temp != NULL) temp = temp->next; [/CODE] I dont understand the statement … | |
This is the code for a fractions program that is to add and subtract(i know it does not subtract yet) I am having error messages that I dont understand. [CODE]// File Fraction.h #ifndef FRACTION_H #define hbg_cmpsc122 #include <iostream> using namespace std; namespace hbg_cmpsc122 { class Fraction { private: int num; … | |
I am going through my C++ class assignments and Iam trying to figure out what the programs I wrote can do. This is one about arrays. Please explain under what circumstances I can use this. Thanks. // arrays_accessing using for loops.cpp : Defines the entry point for the console application. … | |
hi, im trying to read and write an array of integer to/from a file. i use this to write to a file: [code=c]fwrite(texel, sizeof(int), size, fp);[/code] and this to write it: [code=c] (*out) = new int[size]; fread((*out), sizeof(int), size, fp); [/code] but the data read from the same file is … | |
[CODE]#include <iostream> #include <iomanip> using namespace std; void StartUp(void); void WrapUp(void); char ProgramName[] = "Assignment_3.cpp"; //Used to hold the program name void sentenceOne (); void wordOne (); void wordTwo (); void wordThree (); void wordFour (); void wordFive (); void wordSix (); void wordSeven (); void wordEight (); void sentenceTwo … | |
Receiving error when compiling invalid operands of types `double[100]' and `double[100]' to binary `operator*' The code looks like as follows. Trying to submit for homework this evening, and I'm stuck!!! #include <cstdlib> #include <iostream> #include <fstream> #include <iomanip> using namespace std; int main(int argc, char *argv[]) { double employeeSalaryRaises[100]; double … | |
I am doing this silly program as practice but am having problems with the condition in the if loop... Please help me. The condition after the color question goes directly to its condition without accepting an answer. [CODE]// Add directories #include <cstdlib> #include <iostream> #include <sstream> #include <fstream> #include <iomanip> … | |
Hello, I have a program assignment that is supposed to that converts decimal numbers to binary, hexadecimal, and BCD. I am having an issue with keep the leading zeros on the binary. I have used a recursive function to output a binary conversion. [CODE]#include <iostream> #include <iomanip> using namespace std; … | |
I have a promblem with following case : i have a properties.txt that included: 10 Napier St. Palm Cove 350000 47 Darkien Cl. Smithfield Heights 265000 i want to write: On start-up, the program is to prompt the user for the property listings filename (the sample file provided is called … | |
Hi, I want to fill an array with enum Values but using integers in a loop. My set method accepts Enum types and not integers. But when I work with the enums I can use 0,1,2,3 etc. I am trying to fill a deck of cards using some loops. Is … | |
Hi everyone. I'm a bit of a noob at C++, I took the first level of this class 2 years ago and I'm tying to remember everything. I'm having a problem with a program I'm trying to write. I need to average the grades of each student and then print … |
The End.