48,986 Topics
| |
For example if I have this int type variable X that increment from 1 at the beginning to 10 when the program ends, how to open and write to 10 different files (data1.txt,data2.txt,data3.txt....) everytime X increments? I've tried with the following but it didn't work: [CODE]string filename ("data"); int X; … | |
I need a good book to learn CAsyncSocket and Csocket. I want to explain in greater detail the functions and the author is an expert in the field. What do you recommend? thanks | |
Hello. Just asking any fellow nerds out there who program games with c++ or know about it..... about libraries. I know c++ and a few non standard libraries. What I want to know, is what non standard libraries or extras i could use with my compiler to make professional standard … | |
[QUOTE=William Hemsworth;792993][B]mouse_event[/B] is used to emulate mouse events, not to detect them. If you want to be able to detect mouse clicks anywhere (even if your window doesn't have focus), you will have to use something like windows hooks. If your using the Windows API and just want to be … | |
Hi, I'm quite bad in c++ and i have this weird (for me), problem that i can't work around. [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; ..... int main(){ ... int *array1=NULL; int *buffer=NULL; size=....;//a certain size comes from function array1= new int[size];// it looks like both array1 … | |
| |
if we right like that: class myClass { int a; string b; char c; } what will be the size of this class? | |
I'm trying to set up a couple classes, but I'm getting an error: Linker error - Undefined reference to 'Node::~Node()'. I think it might have something to do with how my headers are set up, but I'm unsure what I need to do to fix it. (FYI I added using … | |
Ok so ive already looked up solutions to my problem and my teacher does not allow me to use a simple iterator for the delete instead this is a hard coded delete function. what this program does is ask the user for 10 numbers and creates a vector of size … | |
Hello, I am trying to input an unknown amount of numbers (exam scores) and output whether they are passed, failed, or invalid scores. Passed is any score greater or equal to 70, and failed is 69 and below. Invalid scores are out of the range between 0-100. Sample Input: 77 … | |
I'm working with 2d arrays (which I kinda understand) and a bubbleSort, which I sorta but don't really understand and perhaps those * and & which I'm totally lost on, especially the * which can mean what it means or the opposite of what it means? I don't get that. … | |
Hello, I'm trying to write a function that uses a C++ string object as its argument, and returns the character that appears most frequently in the string. How would I write this? Is a for loop necessary? Thanks for the help. | |
[CODE]#include <iostream> #include <conio> using namespace std; int main() { int MyArray[ 3 ] = { 12, 23, 34 }; //Note 1 int* ptrMyArray = MyArray; //Note 2 int* ptrMyArray2 = &MyArray[ 0 ]; //Note 3 int* ptrMyArray3 = &MyArray[ 0 ]; //Note 4 for ( … | |
[CODE]class BTreeNode : public LinkedNode { public: BTreeNode (BTreeNode* child0, int key0, BTreeNode* child1); BTreeNode (const BTreeNode& sibling); bool isNotLeaf (void) const; BTreeNode* findChild (int newKey) const; BTreeNode* addKey (int newKey, BTreeNode* newChild = 0); BTreeNode* getChild (int i) const; void write (ostream& outfile) const; private: void setChild (int i, … | |
Hi there, I'm trying to write code for an assignment that asks me to read a string and convert all uppercase letters in it to lowercase without using tolower(), since we haven't covered it yet. This is what I have so far: [code] #include <iostream> using namespace std; int main … | |
I have to write a c++ coding for my assigment... the question is write a program to validate a time.. user neeed to enter hour, minute, and second and the time must be checked either valid or not.. if not valid, the program must show in the correct format.. example... … | |
Hello there everyone before I post my ( probably not elegant) code I Would like to first give the community an idea of what I am doing. I am writing a grade organizer program to where I can store a test, lab, or homework grade respectively. I have finished the … | |
Hello everyone. This is my first post on here so please forgive if there are mistakes. I have been searching the forum and other sites to get some answer, but not luck yet. Below is a program that basically asks for names, ids, alias, etc of agents and then writes … | |
Hey all, I have an array in which the user inputs a series of numbers and when "-1" is entered the program is stopped and the average, max, and min of the numbers entered is displayed. I am able to get the average and max but for some reason the … | |
Hi, Are 2D arrays positioned in memory the same way as normal arrays? ex.: char names[2][5] = {"Dean", "Viky"}; If 'names' is memory location 3000, are the letters necessarily stored like this? 3000 = 'D' 3001 = 'e' 3002 = 'a' 3003 = 'n' 3004 = '\0' 3005 = 'V' … | |
Hi, I have different variables and I want to have a final variable that represents the concatenation of those variables by taking a specific number of bits from each variable. For example, if I have 3 variables var1, var2 and var3 and I want to take 3, 2 and 1 … | |
Use the program, Passing-by-value, on the bottom of pp. 248–249 and the program, Passing-by-reference, on pp. 255–256 as a starting point for this assignment. Write a similar program, but change the code to pass two variables to the function call rather than one. that's my assignment and i have tried … | |
First time using void functions. Apologies again for the noobish thread. I have a few questions on this problem. 1) Since the variables miles, gallons and milesPerGallon are used in both main and void, do I need to initialize them in each place? Or if they're initialized in main do … | |
Can you tell me how can i increase the font of my output for particular portions of myy program on the output screen in visual studio.net 2003... for example if i want to give a heading or a title in bigger font.. how can i do so??? | |
Hello, I've written a program that mimics a 32-bit MIPS processor. It does a couple of instructions. It works by reading in a Hexadecimal instruction of length 8 and then carrying out the instruction and writing the information to a file. It was working fine earlier but now I get … | |
Hi, I' am required to convert a MATLAB function into C++, and this requires me to find determinate of a matrix. I was told that use of BOOST library would make my job easier. I went through the documentation of BOOST Library, but couldn't find much info about the same. … | |
Hello all, First of all i am a beginner in vc++, so excuse my question if its simple. I was wondering if I could use the data from button1 in button 2 my code is: [CODE] public:System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { OpenFileDialog open; open.Title = "Select Wave File"; open.Multiselect … | |
I have a code that is opening a browserwindow like this: [code] Process::Start("iexplore.exe", "http://www.google.com"); //Open google in a defaultBrowser [/code] I wonder something about this "iexplore.exe". I am not sure what that meens. Does it meen that it Only will open Internet Explorer if that exists on the users computer. … | |
Hi, I want to convert unit32 variable to uint16 variable because I can't read uint16 directly from a file using sscanf. Is that possible? Thank you! | |
I have tried to implement a stack class but i got stupid errors. There is a stupid error i know but i couldnt find it. [CODE]#ifndef STACK_H #define STACK_H /*Manual implementation of Stack class. By this way it will be possible to learn the advantages of Stack data structure over … |
The End.