49,757 Topics

Member Avatar for
Member Avatar for bwilson1

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 …

Member Avatar for Schol-R-LEA
0
181
Member Avatar for otreblag

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, …

Member Avatar for otreblag
0
130
Member Avatar for IT FRESH

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 << " * …

Member Avatar for Schol-R-LEA
0
131
Member Avatar for pendo826

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 …

Member Avatar for gusano79
1
760
Member Avatar for pendo826

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 …

Member Avatar for Moschops
0
114
Member Avatar for chuyauchi

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. …

Member Avatar for thines01
0
213
Member Avatar for jeevsmyd

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 …

Member Avatar for Ancient Dragon
0
115
Member Avatar for pendo826

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; …

Member Avatar for pendo826
0
135
Member Avatar for XodoX

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 …

Member Avatar for mrnutty
0
1K
Member Avatar for user543820

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,

Member Avatar for user543820
0
6K
Member Avatar for hardingC

#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** …

Member Avatar for hardingC
0
171
Member Avatar for luisborlido

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 …

Member Avatar for luisborlido
0
315
Member Avatar for sheennave

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 …

Member Avatar for cahitburak
0
108
Member Avatar for IT FRESH

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 …

Member Avatar for Narue
0
188
Member Avatar for nyuszi

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; …

Member Avatar for nyuszi
0
257
Member Avatar for rhn94

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 …

Member Avatar for rhn94
0
248
Member Avatar for smallrubberfeet

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 …

Member Avatar for Clinton Portis
0
2K
Member Avatar for minghags

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() …

0
115
Member Avatar for stereomatching

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" /> …

0
68
Member Avatar for jefgreen

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 …

Member Avatar for vijayan121
0
155
Member Avatar for thenewbiecoder

[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 …

Member Avatar for vijayan121
0
3K
Member Avatar for smallrubberfeet

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 …

Member Avatar for mazzica1
0
129
Member Avatar for coroshea

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 …

Member Avatar for coroshea
0
279
Member Avatar for bawbawbiscuit

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

Member Avatar for bawbawbiscuit
0
152
Member Avatar for dannyc116

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 …

Member Avatar for Clinton Portis
0
7K
Member Avatar for LopezGG

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 …

Member Avatar for LopezGG
0
163
Member Avatar for borchu

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 …

Member Avatar for mazzica1
0
561
Member Avatar for sheennave

[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 ? :?:

Member Avatar for sheennave
0
126
Member Avatar for libathos

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?

Member Avatar for libathos
0
104
Member Avatar for NickPatton

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, …

Member Avatar for mazzica1
0
3K

The End.