51,593 Topics

Member Avatar for
Member Avatar for mozira

In class we did a program on moving a round object up and down on a form,we finally figured it out but what i want to know is there are another way of shortening the coding instead of tesing using boolean :(

Member Avatar for zyruz
0
230
Member Avatar for jhdobbins

just curious why this isnt working... its probably simple.. but its a friday so im allowed to not access my brain as much... anyways... i want to input a string then switch that to a char array then switch back and print reversed string this doesnt work... debugger stops it …

Member Avatar for jhdobbins
0
139
Member Avatar for freemind

Hi to everybody! Here I paste some simple exercise code that I wrote. The errors are pasted from the compiler log at the end of the source code. The add() function looks ok to me and I can't understand what the compiler wants from me :o Thanks! [CODE] #include <iostream> …

Member Avatar for TomcatMCAD
0
434
Member Avatar for raevin

Hello all, I'm working on a program using MFC and VS6, and when I split my program into files (aka: move certain portions to a new file for easier reading and such), I get this error: [code] error C2065: 'IDD_DIALOG' : undeclared identifier error C2057: expected constant expression [/code] Here's …

Member Avatar for raevin
0
224
Member Avatar for rks01

hello all . well its pretty simple but i need to get this for loop sorted before i can move on. #include <iostream.h> void square(); void circle(); void arrow(); void diamond(); using std::cout; using std::endl; void square() { //first line for (int e = 1; e >= 9; e++) { …

Member Avatar for rks01
0
157
Member Avatar for mav1

I am working on displaying the amount ofodd numbers in this array. It always says there is 5. That is not correct. When I use the debug it shows that it is placing a different value in the myArray and using that to determine the amount of odd numbers. Please …

Member Avatar for The Senate
0
227
Member Avatar for karen_CSE

hi, I'm working on a project and I'm almost done. However, I'm having a few problems with the prices. this is the guide for the project: Airplane Seat Allocation System Write a C++ program for the following task using modular approach. a) 48 seats in 12 rows with a Aisle …

Member Avatar for karen_CSE
0
1K
Member Avatar for thiru.y

hi, I am a newbie learning c++ ..I would like to know how Images r loaded in C++ and if it can handle and execute basic image manipulations and also filters ,also whats the maximum amount of bitdepth for images (if there is a upper threshold) that can be handled …

Member Avatar for Narue
0
227
Member Avatar for rony

Hiya, Does anyone know of linking Java with Fortran under Windows OS, preferably Windows XP? Can anyone give a short example including code? I have found pretty good examples of using Java-JNI-C/C++ works pretty well. I am using Dev-C++ compiler. I look forward to hearing from someone. Thx Rony

Member Avatar for Narue
0
224
Member Avatar for pscha3

Hello. I thought I was done with this program but It doesn't work like its supposed to. I wrote the program to display the file every time I press one. But it only works the first time. After that it jus keeps sayin cannot open file. Why does it say …

Member Avatar for pscha3
0
166
Member Avatar for murschech

I have a question on external variables in a multifile program. Quoting from K&R (first addition, page 72) "By default, external variables are also "global", so that all references to such a variable by the same name (even from functions compiled separately) are references to the same thing." Here's an …

Member Avatar for Dave Sinkula
0
147
Member Avatar for lyndonp

I am not an expert C/C++ programmer, and am having a bit of a problem on a school assignment. The assignment is to build a text file based database. The program has to read a schema file containing information about the individual tables (table name, filename, data field name, type, …

Member Avatar for lyndonp
0
234
Member Avatar for pscha3

When I wrote this program with a structures. I said: [code] { struct Contact { char Name[101]; char Middle[101]; char Last[101]; long Area; long Area1; long Area2; long Area3; long Home; long Business; long Cell; long Other; char Email[101]; char Address[101]; int Zip; char City[101]; char State[101]; char Country[101]; char …

Member Avatar for Narue
0
260
Member Avatar for altheastronut

Hello all, I haven't used c++ for years and now I need it for school. I am running a fortran 77 code and I wanted to know if it is possible to write a program in c++ (That's the only language I know) that generates random numbers with decimals and …

Member Avatar for Rashakil Fol
0
228
Member Avatar for bballmitch

what does the printf function do? it looks something like this... printf("kdjfkldjd"); and you can put anything in the quotes, but then i don't know where it shows up. where is the text supposed to show up? can someone help me out?

Member Avatar for Narue
0
313
Member Avatar for mozira

I see Dave Sinkula understands C++ very well.How can one be assisted by Dave Sinkula

Member Avatar for Dave Sinkula
0
364
Member Avatar for jhdobbins

why does the output file look completely different than the input file... what am i doing wrong here? [CODE]#include <iostream> #include <cstdlib> #include <fstream> using namespace std; int main () { char maze[10, 10]; int x, y; ifstream file; ofstream output; file.open ("maze.txt"); for (y = 0; y < 10; …

Member Avatar for jhdobbins
0
167
Member Avatar for yaan

I'm confused as to why my program is turning out errors when I try to compile the code. Please help. [code] #include<conio.h> #include<stdio.h> #include<iostream.h> #include<string.h> class link_stack { struct node { int id; char name[10]; node *next; }; node *top,*x,*ptr; public: link_stack() { top=x=ptr=NULL; } void push() { x=new node; …

Member Avatar for Narue
0
183
Member Avatar for ferrant

Hi, I need to create a stack with a key and for each key one or more instances of a data structure associated. A multi map seems to be best suited for this. However, I don't know how I could extract an element with the maximum key value whithout knowing …

Member Avatar for Narue
0
328
Member Avatar for beetle

hi, how can i do it: int array[20]={3,431,4,123,4,52,52}; using vectors??

Member Avatar for Narue
0
172
Member Avatar for al_meltaa

guys i am having a simulation project for my final year and this project has to be designed using c or c++. all i need from u guys if u can help me is how to draw an airplane in c++ in 3 diemension .. because i am gonna design …

Member Avatar for Stoned_coder
0
142
Member Avatar for Hady

I have a C++ program (Console Application), I want to be able to access it from the Web, My problem: I don't want the program to load every time a user connects to the page (it takes toooo much time), the program should load once and forever on the server …

0
107
Member Avatar for truelies

class array problem. -------------------------------------------------------------------------------- I encoutered a problem and can't solve it: in main() hformation *fdatah; fdatah=new hformation(); then sent it to a function: formationinput(vformation *fdatav,hformation *fdatah,ptfilein); in the function, I redefined this class pointer as an class array: fdatah=new hformation[7]; passed compile and link, but each time debug to …

Member Avatar for Narue
0
89
Member Avatar for Jon182

Hey guys, I was just wondering if there is a way in C++ to stop a program from crashing if the user enters a char instead of an int by mistake? Thanks in advance.

Member Avatar for Jon182
0
446
Member Avatar for parisa85

Hi there! please tell me how can i link my source code and header file together in borland c++. i got an answer before that told me to see bcb5.hlp but my borland helo doesn't have it. thanks alot.

Member Avatar for Narue
0
148
Member Avatar for parisa85

I'm using borland c++ to program c++. I don't know how can I connect and compile programs with multiple header-files. :o please help me.

Member Avatar for Stoned_coder
0
97
Member Avatar for kharri5

Greetings To all! To whomever, an advanced thank you if you help me. I am a Java programmer initially, but I have begun learning C++ and am doing something with a Double Linked List (Error occurs whether it's double or single, I teste it). Filling the contents of the list …

Member Avatar for Drowzee
0
780
Member Avatar for karen_CSE

Hi, I'm trying to write a program that accepts a string (a line, sentence, or phrase) and then the program has to display the contents of that string backward. for example, if I entered "starting out" the program has to convert it to "tuo gnitrats". This is my code. But …

Member Avatar for karen_CSE
0
1K
Member Avatar for ramcfloyn

I am currently writing a C++ program that uses a external library and engine that is primarily based in C. I am attempting to load an image file and the function requires that the argument be passed as a char *szFileName. I have the file address as a string and …

Member Avatar for ramcfloyn
0
840
Member Avatar for djbsabkcb

Exactly how do you create multi-file project and how do you compile it in C++ using Linux?

Member Avatar for kc0arf
0
325
Member Avatar for rony

I am using Dev-C++ to create a dll file which will link Java-JNI-C-Fortran The project contains CCode.C and JavaCode.h and when I compile, I find the following error: Linker Error>Undefined referece to 'sumsqauredf' The CCode.C file is [code]// CCode with documentation #include <stdio.h> #include "JavaCode.h" // Required header for JNI …

Member Avatar for Narue
0
322
Member Avatar for ifulcrum

Hello, i have problem with Mapi and unicode. I'm workking under win XP, outlook 2000, visual studio c++ 6.0 and extended MAPI. I'm trying get contacts (and information about contacts) from outlook. Everything working when i'm not using Unicode. I get contacts, properties and so on. Problem occurs, when i'm …

0
181
Member Avatar for desidude

Hi; i am trying to write complex.cpp and it gives error message can somebody look and write me back what is wrong here is the program[ three parts] and the error message [CODE] #include<iostream> #include<cctype> #include<cstdio> #include"complex.h" using namespace std; void main(void) { CComplex a; CComplex b(5.5,2.2); CComplex c(b); cout<<"a …

Member Avatar for Rashakil Fol
0
234
Member Avatar for winbatch

Hi, I would like to be able to use an api for reading/writing to a file database. Basically, I will have to write programs that have recovery (meaning if it shuts down, etc. it has a file/files to recover from). I could attempt to write something myself but if it …

Member Avatar for winbatch
0
187
Member Avatar for bandm

Hello All, I am new to programming and have several books on starting out with C++. I was just curious if there was a publication that has a list of codes and there functions and Syntax. Perhaps with examples of how they are used. Kind of like an Encyclopedia? Thanks, …

Member Avatar for Narue
0
185
Member Avatar for hike34

Hi all and thanks in advance for any help. I have a basic program that needs to read a number of inputs from a user. To all these inputs I assign a default value before I call for the user to give diffrent input. Here is the thing, the input …

Member Avatar for Rearden
0
226
Member Avatar for cpp noob

hi, [B]for( turbo c++)[/B] :eek: is there anyway my program can recognize words :idea: :!: . for eg. cin.getline(sentence,10); :rolleyes: "Hello how are you?" then the program recognises the words - hello, how, are , you and prints "im fine". :) and if i cin >> " hello how are …

Member Avatar for winbatch
0
120
Member Avatar for sifuedition

I am actually having two problems. The first is initializing a char array to a single space for all elements. I have the loop to do this but the assignment to the value: " " is returning a compile error: error: invalid conversion from `const char*' to `char'. Then, when …

Member Avatar for Narue
0
325
Member Avatar for BenPage

Hi there. I am using Operating System: Windows XP Project: Visual Studio 2003 C++ MFC Dialog Based Application I subclassed an edit box control because I want to capture the WM_KEYDOWN messages when a user enters characters in the edit box. I need this because I want to measure the …

Member Avatar for Alvein
0
267
Member Avatar for bandm

Hello, I am just messin around with this "A Simple Win32 GUI Introduction" snippet I found on this site. I am able to paste it in to a simple project in my Visual C++ application and run it. Basically it is just a blank window. It says you can play …

Member Avatar for vegaseat
0
287
Member Avatar for lax_irtt

c program to find smallest among three numbers without using comparsion operator C program for the simulation of unix grep command

Member Avatar for Narue
0
126
Member Avatar for 1337WTF

For those of you who are familiar with this app. I am having some difficulty configuring the # statement to call the header file. I edited the .cfg files necessary and added the /bin directory to the windows (xp) environment and still no luck. When attempting to compile a simple …

Member Avatar for Dave Sinkula
0
130
Member Avatar for brycegordon

First of all i hope i am posting this in the right place. Anyway, i have recently purchased a copy of sam's teach yourself c++ in 21 days (fourth edition.) and have realy gotten stuck into it with the dream of being able to create some cool programs. i want …

Member Avatar for vegaseat
0
387
Member Avatar for alone2005

I define a class which hold some variables first: [code] class Command{ string cHandle; int numPara; vector<int> cPara; public: Command(); Command(string ucData); //...............more functions here }; //end of class definition [/code] Then I declare an object of Command and wanna store it in a vector [code] vector<Command> cv; Command c; …

Member Avatar for alone2005
0
143
Member Avatar for Rearden

i.e. . . [code] #include<iostream> void EatFrisky(Cat *Cat); int main() { Cat * Frisky = new Cat; EatFrisky(Frisky); return 0; } void EatFrisky(Cat *Cat) { delete Frisky; std::cout<<"Someone ate Frisky!\n"; } [/code]

Member Avatar for Drowzee
0
138
Member Avatar for Rearden

I have this function in a Dog Class and for some reason, the age nearly always ends up being 77. I can't seem to tell what the problem is. Any ideas? [code] void Dog::setage() { while (1) { int age; std::cout << "Please Enter " << itsname << "'s age: …

Member Avatar for Rearden
0
99
Member Avatar for djbsabkcb

I must ask user number of students who took test, then create a dynamic array and then get the scores for each student. Then calculate the sum,average of the scores. My problem is that once it calculates it continues to ask user for student scores. I am confused with this …

Member Avatar for winbatch
0
211
Member Avatar for meff_04

i'v got a very annoying problem. each time i put my Sims cd in my disk drive this message always comes up: [i]Microsoft Visual C++ Runtime library[/i] [i]Runtime error![/i] [i]program c:\Program Files\Maxis\The Sims\Sims.exe[/i] [i]Abnormal program termination[/i] someone please help, iv tried evrything, i havent got a clue what visual C++ …

Member Avatar for xeoneon
0
382
Member Avatar for joeh157

Can anyone help with a program that would allow you to enter 5 floating point values into an array called Marks and then calculate and displays the average of the marks entered? Also need help with a second program that manipulates an array of 7 integers according to the following …

Member Avatar for Dave Sinkula
0
178
Member Avatar for alone2005

in one file I define [code] void Show(char* s){ string str =" "; str+=s; cout<<str<<endl; } [/code] then in main I call it by [code] char s[100]="Testing..."; //or use *s here, make no difference Show(s); [/code] output nothing but blank. weird?

Member Avatar for alone2005
0
250

The End.