49,766 Topics

Member Avatar for
Member Avatar for salah_saleh

Hello!, I know this my be slightly unrelated question but it's very simple questions and I know many of you will find it very easy. I want to pass several txt files to my c code using make file, but I can't make it right, so please help me in …

Member Avatar for Fbody
0
446
Member Avatar for BoBok2002

I am struggling to write the push and pop functions for a stack of arrays. I know how to write the code to push single items unto a stack and pop them out. Some have suggested that I use an array of arrays (two-dimensional array) to load the array of …

Member Avatar for BoBok2002
0
1K
Member Avatar for squ200

hi all i have a problem and i hope someone will help me. i have this program and i want to find the absolute maximum difference between y1 and y2 ??!! i have found the difference between y1 and y2 but i could not find the maximum difference between them!!! …

Member Avatar for Moschops
0
214
Member Avatar for riahc3

(So continues the JNI saga....) I currently have this (in C++, this being my native code in C++): (x is a jstring passed thru the header) [code] jdouble res; if (x=="*") { res=a*b; } else if (x=="+") { res=a+b; } else if (x=="-") { res=a-b; } else if (x=="/") { …

Member Avatar for riahc3
0
146
Member Avatar for jeevsmyd

Suppose I have a simple program to find the largest of two numbers of different datatypes and return the largest.I'm implementing it as a template to support generic datatypes [code] template<class T,class U> T max(T t,U u) return (t>u?t:u); int main() { int x=70; float y=100.5; max(x,y); return 0 } …

Member Avatar for mike_2000_17
0
223
Member Avatar for eshalmj

[I]Could somebody please help me in this C++ program? I'm a beginner and have no idea doing this tutorial. anyone who could help me would be greatly appreciated. here is the question: [/I] Create an inheritance hierarchy that a bank might use to represent customers’ bank accounts. All customers at …

Member Avatar for divyakiran
0
888
Member Avatar for phorce

Hello, I have a map that contains the alphabet (key) and a double (value) and I would like to sort the list so that the highest value is at the top but it still keeps it's key.. E.g. [code] #include <iostream> #include <map> int main() { map<char, double> alphabet; alphabet['a'] …

Member Avatar for vijayan121
0
135
Member Avatar for youngyou4

Hey guys, I have an assignment that I have been working on for hours and I've done a lot of testing and I finally got it working, but when I try to change it to make sure to prompt the user for an input I can't get it to work …

0
76
Member Avatar for nuclear

Theres this thing that i dont fully understand. Im using this tutorial: [url]http://lazyfoo.net/SDL_tutorials/lesson08/index.php[/url] and i in here we first set up some surfaces with text and then asign their value to the message and then for some reason we have to reset the message value to 0 in order for …

Member Avatar for raptr_dflo
0
485
Member Avatar for fsefsef23

I'm finding myself stuck trying to simply get a userInfo class's sets to work, but every time I try and compile with simple code like this in my application file: userInfo stuff; stuff.setId("test"); It gives me one of those 'undefined symbol' errors and references to the userInfo::setId function: Undefined first …

Member Avatar for Moschops
0
165
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
182
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
131
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
132
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
779
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
115
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
217
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
136
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
172
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
320
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
192
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
258
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
256
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
116
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
69
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
156

The End.