49,761 Topics
| |
[CODE=C++]#include <iostream> #include <fstream> #include <vector> #include <string> #include <sstream> #include <stdio.h> #include <time.h> using namespace std; bool StringToInt(const string &s, int &i); int main() { // opening up and setting up the input file stream so we can read it // to perform the "account info" and the "history" … | |
Hello guys, I'm new here, and this is my first post in this forums. Please bear with me if I can't explain what I'm in need of well. Basically, this is part of my assignment, and I'm supposed to find a path from one end to the other in a … | |
Hi all, i'm looking into doing a little bit of work with the mouse in console applications on windows. I'm using windows.h to get access to functions such as ReadConsoleInput. I've created a simple program that just prints a string whenever the left most mouse button is clicked. However sometimes … | |
hi, i need to read a file and to store contents in buffer. to read the first 8 bytes and to move the pointer to read the strings in that file. could any one help me? | |
Hi I have exam after 12 hours, please help me to writing those programs…… And thank you 1. Write a c++ program to output the histogram of a sequence of 10 positive integers. this program first asks the user to enter 10 integers. then write the histogram of this sequence … | |
I have an Array A[N]={1,2,3,4,5,6}; and I want to split it to 2 arrays of size N/2 such that B = 1, 2, 3 and C = 4, 5, 6 here is my program but there is something wrong with array C Can you help me with it ? [CODE]#include … | |
How do I code a C++ program that used an array to find an average of positive numbers. Then outputs the result | |
I'm trying to get the game below to work with 2 players. It's setup the way I need it (even the entering the numbers for the die instead of using a rand function and not allowing the bet amount to change(crazy teacher)) I just can't figure out how to make … | |
Hi I am writing a function in C++ extern "C" { __declspec(dllexport) void CreateInputFilter() { ITestPtr pTest = createInstance<ITest>(m_Test); } } But I am getting this error m_Test' : undeclared identifier The main thing is above this function I have written the same code above in another function but there … | |
Hi I am made a library project. Now I want to use the functions of dll in another project. As I am new to C++ I don't know how to import the dll and use its function. Is there any tutorial that elaborates these things. Thanks in advance Karan | |
I am new to the fascinating world of C++, I should of stuck with Spanish.. But I have an assignment due and I am so close I can taste it. I am having an issue with my global functions. I can not get my average function nor my maxGrade function … | |
Hi I have build one dll project . I want to use that dll in another project. But when I include the header file of the project I am getting an error Error 2 fatal error C1189: #error : "include 'stdafx.h' before including this file for PCH" Am I missing … | |
I am working on an MFC application which has a chat module in which i want to implement File Transfer/Upload to server using HTTP Post Method . Please help me Thanks Dhiraj | |
Hi friends , :( I've made a programme that can read a file and if it finds a peticular string in the file it shows the whole line. I've used "stringstream" to extractone by one and I checked that by the If loop on true condition it prints the whole … | |
Okay, I have to store an adjacency matrix for a graph problem I'm doing. Let's use this picture to explain it right now. [url=http://i21.photobucket.com/albums/b272/DemonGal711/Program%20Pic/pic.jpg]Click here[/url] I figured, I'm use a linked list to store it where each node uses the struct [code]struct Node { char item; Node* vertex; Node* next; … | |
I have writtern some code but apparently i have not initalised two parts of it, now to my knowledgde i have and i can not see why it is showing warnings for it. i hope you can help. [CODE=cplusplus] double m, l, dm, dc, xsq, D; W_line_Sum(line ,t); W_line sums; … | |
Hello, I have a program that's 95% written. I am getting weird results though, so I will need you to fix it and EXPLAIN why that worked. This should take an experienced programmer less then 30 minutes. I would post it on here, but it's over a thousand lines of … | |
[CODE]void StrCpy(char * Dest , char* Src ) { while(*Src){ *Dest = *Src++; cout << *Dest ++; } } void main() { char* string1 = "\0"; char * string2 = "EL"; StrCpy(string1, string2); //cout << string1; //must output EL } [/CODE] Im trying to output EL after its copied to … | |
I want to writer a program in which i input an array? let the array i entered is : 4 1 2 3 The prigram can take values and find the positions of the character in the array such that the smallest on 0 position and so on. The result … | |
Hi I was wondering if anyone could help I'm receiving a segmentation fault whenever I go to run my main.cpp on my program. I've never encountered this before and was wondering if anyone knew how it can be fixed. The program consist of equiv.h, equiv.cpp, graph.h, graph.cpp, and main.cpp here … | |
I have to read in values from a file and output only the ones that past the test. However, I'm not sure how to compare a few of them. I need to skip the word if it ends with '\n', '\t', or a space. So, how exactly would you handle … | |
I have to make a program that reads in words, deletes certain ones, stores ones that pass, and then count the total. He didn't exactly specify how the words would be coming it, but I'm assuming that if a space at the end of the word is bad, that it's … | |
How would I delete one char from a string? [CODE]string aWord = "question?"; while(aWord[i]) { if(isalpha(aWord[i]))printf ("character %c is alphabetic\n",aWord[i]); else delete[i]aWord; i++; }[/CODE] | |
I want to write a program which take input and save the poistions of the array elements in another array. let if i enter an array A[0]= 4 A[1]=1 A[2]=2 A[3]=3 now the output array will hold 1 2 3 0 i-e the posistions of the array elements starting from … | |
| Welcome to the temporary page for the official Nightmare Productions C++ Contest. What do we hope to achieve by holding such a contest? We are attempting to spread the knowledge of C++ and hopefully get others interested in it. The contest description is below. In order to enter the contest, … |
[B][U]Introduction[/U][/B] You are going to design a program which will print out each line of its input that contains a specified pattern or string of characters. For example, searching for the pattern "Humpty" in an input text file that contains the following: In Sixteen Hundred and Forty-Eight When England suffered … | |
The code is pretty easy to understand what I am doing. You basically pick a number 1-4 and it will do either addition, subtraction, multiplication, or division. What I need it to do is after they do a problem it loops back and lets them do it again, until they … | |
#include<conio.h> #include<stdio.h> #include<fstream.h> #include<graphics.h> #include<dos.h> #include<time.h> #include<STDLIB.H> // FOR EXIT #define ESC 0x1b /* Define the escape key */ void Pause(void) { int c; c = getch(); /* Read a character from kbd */ if( ESC == c ){ /* Does user wish to leave? */ exit( 1 ); /* … | |
Hi I have declared the class in the header file class Test{ public: // Constructor Test(); // Variables IClassFact *m_pClassFact; }; But I am getting an error error C2143: syntax error : missing ';' before '*' And also I am getting this error error C4430: missing type specifier - int … | |
Okay, I'm making a program that puts six word sequences into a hash table by taking the ascii value of each letter of the word and adding it to the sum, and multiplying it by a value, such as; num = num + int(firstName[nq])*(nq+1); in a loop. Now, I have … |
The End.