49,757 Topics
| |
I know its bad to wait last minute ,but I have been working on the code the last couple of days with no result ,and now I'm finally starting to panic.I am having trouble with my program. I have been working on it for the last couple of days. I … | |
Hi, First post here. I need to scan a file (NC milling output) with, potentially, tens of thousands of lines of text, looking for keywords. Every time I find a keyword, say, a tool change command, I want to print out twenty lines - the ten lines above this line, … | |
WHT!!!! [u][b]i dont know whats wrong but i tried to to Merge both codes the if - statement dont show ...[/b][/u] [code] #include <iostream> #include<cstdlib> #include<stdio.h> using namespace std; /** Showing the introduction screen and the user maual... */ void splash(void) { cout << " ********************************************************\n"; cout << " * … | |
Hey im writing a program and i have countless errors. Im following tuturiols and i have no clue what has happened. Thats the list. Im screwed. can anyone spot anything to get me kick started into a functional game. 1>c:\users\conor\documents\visual studio 2010\projects\ca2\ca2\weapon.h(21): error C2590: 'load' : only a constructor can … | |
In this .cpp i have an error saying member function cannot be redeclared. I dont know what it needs to get rid of the error obviously it needs a declaration somewhere but where? [CODE]#include <iostream> #include <ctime> using namespace std; Monster::Monster(std::string Name, int health, int hitPoints, int miss, int damage,const … | |
I have a difficulty for saving a file in C++. I have an existing file which is opened by my program. The program should save the changes to the existing file (Example: D:\A4.txt) when I select 4 (as known as the menu). However, the program does not save the changes. … | |
class vector { int *v; int size; vector ( int m ) { v=new int[size=m]; for(int i=0;i<size;i++) v[i]=0; } vector( int *a) { for(int i=0;i<size;i++) v[i]=a[i]; } }; int main() { int x[3]={1,2,3}; vector v1(3); vector v2(3); v1=x; v2=y; return 0; } My doubt is , how can the constructor … | |
Can anyone see the problem with my method ATTACK [CODE]#include "Monster.h" #include "Player.h" #include "Weapon.h" #include <iostream> using namespace std; Monster::Monster(std::string Name, int health, int hitPoints, int miss, int damage,const std::string& weaponName) { Name = Name; hitPoints = hitPoints; Weapon weapon; miss = miss; damage = damage; weapon.Name = weaponName; … | |
Ok, so I'm trying to fix this.. [CODE]# include <cstdlib> # include <iostream> # include <iomanip> # include <cmath> # include <omp.h> using namespace std; int main ( void ); void jacobi ( int n, double a[], double b[], double x[], double x_old[] ); void r8vec_uniform_01 ( int n, int … | |
Hello! I want to split a string, say : "I have a dog" of string data type to an array of strings. I want to save that array. i.e I want an array like: array[0]="I" , array[1]="have" , array[2]= "a" , array[3]= "dog" Please help me out. Thanks, | |
#include <iostream> #include <windows.h> #include <cstdlib> #include <ctime> #include <cstdlib> #include <mmsystem.h> #include <vector> #include <conio.h> #include <functional> #include <stdio.h> using namespace std; char option; int answer; string theQues; string theAns; string ans; void Start(); void Level1(); void Level2(); //oid Level3(); int point=4; int main() { // system("color CE"); cout<<"\t** … | |
I am doing an ATL Project in VC++ 2005 to use as ActiveX in VB6. I added methods, properties and events following the steps in this tutorial: [URL="http://www.codeproject.com/KB/atl/SimpleATLComWithDotNet.aspx"]http://www.codeproject.com/KB/atl/SimpleATLComWithDotNet.aspx[/URL]. Everything is working fine while I'm working inside the class. But now I need to call an event or method of the … | |
Hello all, Visual Studio 2010 SP1 is running on a XP SP3 pc. Its C++/CLI IntelliSense support is enabled according to default configurations. However it also gives the message Intellisense unavailable. Do smb know how can this issue can be fixed ? Do i need to install an update, patch … | |
hello guys ... i have a problem with my code here its basically to ask the user to input the time as HH:MM:SS then i calcluate the time as time=hh+mm/60+ss/3600 so first i used string so i will be able to store ':'.. now how to convert this string into … | |
Hi i need a little help. i want to read a multi array from a file but code blocks said a lots of error and i dont know whats the problem. can u help me? [ICODE]#include <iostream> #include <cstdlib> #include <math.h> #include <fstream> #include <sstream> using namespace std; int maxn=100; … | |
I looked around quite a bit on how to solve this but i couldn't find a lot .. can anyone help me? The capitalized variables are constants [CODE] case '4': { bubbleSort(aList); string strKey; cout << " Input: "; cin >> strKey; binarySearch(aList, strKey); int binarySearchResult = binarySearch(aList, strKey); if … | |
Hello all, I'm having a bit of trouble logically figuring out what to do in this case for my cs150 class. I have to create a linked list from a while loop, but I can't figure out how to link the list successively at the end of each line so … | |
Hello! I just made an program, but now i have problem with sorting output in the asc. order (int datum) thats date in our language :) [CODE] #include <iostream.h> #include <stdlib.h> struct datum { char dan [32]; char mesec [13]; char leto [5]; void vnosDatum(); void izpisDatum(); }; void datum::vnosDatum() … | |
We already use a tool which called codeSynthesisXSD to transform xml into source codes of C++ Yet there are too many tedious routines could be automated. like [code] <xs:complexType name="common_t"> <xs:attribute name="channel_id" type="channel_id_st" use="optional" /> <xs:attribute name="audio_record" type="xs:string" use="required" /> <xs:attribute name="firmware" type="xs:string" use="optional" /> <xs:attribute name="login_id" type="xs:string" use="optional" /> … | |
I have a couple of questions, regarding my program: ----------------------------------------------------------- #1: Is it possible to have my table centered? The table is located towards the bottom of my console output and, as you can see, the data is sort of off center. #2: Instead of having the user input five … | |
[CODE]class Fraction { public: Fraction(); Fraction(int numerator, int denominator); void divide(int& num, int& denom) const; void multiply(int& num, int& denom) const; void add(int& num, int& denom) const; void substract(int& num, int& denom) const; int getNum() const; int getDenom() const; bool operator > (const Fraction& otherFraction) const; bool operator < (const … | |
Hello, I need to sort the following by ID as I enter them into a linked list by while loop. So far I can build through the list, but I'm not sure how to sort by ID as they are entered: Albert 1000 55.5 150 Babs 3000 60 110 Freida … | |
This has really been frustrating me for hours. I have included useful comments in the program. All the descent examples i've come across were using char instead of string. :icon_cry: [CODE]#include <iostream> #include <string> using namespace std; class Celeb { private: string name; //Name of celebrity folowed by decade they … | |
I searched all over the net trying to find the reason behind why numbers are illegal as first characters in naming identifiers in C++, they say its illegal but they don't say why its illegal Id be glad if someone could tell me why :) , just curious | |
I am trying to use C++ (in Visual Studio 2008) to create a program that I first made using Visual Logic. The program is supposed to check the users input with an external text file. The external text file just has the username's and passwords... https://sites.google.com/site/sharearea404/ I tried using arrays … | |
Hi , I have a 2 D matrix which is a vector <vector> type. I wan to find out the unique rows. To use std::unique the rows have to be sorted. I tried using std::sort with a predicate. But sorting does not work . Could someone help me [code] typedef … | |
Hi, my question is simply but a little bit tricky; let assume that there are two array array1 = (2, 5, 6, 1, 7) and array2 (3, 2, 6, 8) and after function setUnion new array or use pointer return (2, 5, 6, 1, 7, 3, 8). Below my code … | |
[CODE] System::String ^name_string; SqlCeConnection ^sqlConnection = gcnew SqlCeConnection("Data Source=Northwind.sdf"); sqlConnection->Open(); SqlCeCommand comSelect = gcnew SqlCeCommand("SELECT * FROM tablo WHERE id = 33 ", sqlConnection); SqlCeDataReader ^reader = comSelect->ExecuteReader(); name_string = reader["name"]->ToString(); sqlConnection->Close(); [/CODE] What's the mistake on the code above ? :?: | |
I'm writing a project in xlib and have a problem concerning the colors.I use unsigned long type variables for storing the color values.does anybody know how can i take the red green and blue values of each color? | |
I'm working on a program that takes 5 integers from input and then prints out the smallest and second smallest of those integers. The program correctly outputs the smallest number but the program often outputs the second smallest number incorrectly because of ordering. For example, if I enter 33, -6, … |
The End.