43,549 Solved Topics
Remove Filter ![]() | |
Hello ladies and gents, I'm trying to reverse a string when one is entered with cin.getline, so when typing for example: testing My output should become: gnitset Ive written this piece of code and it works but, because the string has a certain length and not the whole length of … Software Development c++ | |
![]() | I'd like to ask if anyone knows how to randomize character variables, and if it is possible to define the possible characters it can use in the randomizing process. Any info would be excellent ^^ T#4NK$. Software Development c++ ![]() |
Dus anyone kno a good 32 bit c++ compiler [B]for free on the internet[/B] Software Development c++ | |
Hello ladies and gents, Ive written a program wich I'm almost certain it'll work, Ive only got one problem, I need to write an if like this: int a = 0; if ( u!=x) a++; Now, u is a floating variable wich is divided before this selection by 2, 3, … Software Development c++ | |
I am writing a program using a linked list and I am almost to the point where I can compile and run it but I keep on getting this error message: error C2447: missing function header (old-style formal list?). What does it mean? I looked through the code but I … Software Development c++ linked-list | |
Hello people I'm new to this forum and only been suing c++ / c for a little while now. I'm trying to seek out help with a program. I've written some of the code: .................................................................................................... #include <iostream> #include <iomanip> #include <ctime> #include <cstdlib> using std::cin; using std::cout; using std::endl; using … | |
Hai! I tried writing a stack program using the concept of templates. It worked well for the int,char and double.But when i tried to pass a complex class error occured. Is it possibleto pass a class to the template class? If so what is the syntax for doing it? I … Software Development c | |
I've been having some fun with early programming and have created several projects with various attempts at some failed programs. I wanted to redo, with new file names, some of these with new attempts. However when I try to delete the bad files in a project, the project stills lists … Software Development c++ | |
I am writing a program that uses a singly linked list. The program is suposed to ask the user for the number of days they have temperatures for and for the corresponding temperature. I seem to be having a problem with the get_temp function. When I run the program it … Software Development c++ display linked-list | |
i am in the midst of studying for finals and i came across a program about the olympics. in this program we were given the id's of each judge and the scores to put in. once we have all the scores you are asked to average them. although my program … Software Development c++ | |
I am used to using: [CODE]char *str;[/CODE] to make a string but recently have changed to using the ANSI string class as its a lot more powerful and easier to use... BUT i have a problem! when I have encountered a string which conatins a " character I have used … Software Development c++ | |
Hi al...I am a total c++ beginner...I need ur help plz...I am making a program which asks the user to input a binary number and displayz the binary number converted to decimal number using a function. The code which i wrote is below: #include<iostream.h> #include<math.h> int bin2dec(int n) { int … Software Development c++ | |
I am having a little trouble incorporating a simple password into a voting machine style program. If anybody can see what's wrong with it and point it out, I would be very grateful. [CODE]#include <iostream> #include <iomanip> #include<string> #include<cstdlib> using namespace std; int main() { char choice; string password = … Software Development c++ | |
:cry: I am very confused, i am working on a console application and it doesn't seem that my console output codes are working. Can someone tell me whats wrong? cout << "text" << end1; Software Development c++ | |
Sir, I need ur help in the Following Assignement. I have to write a program to store the Employee details i.e rollno,Department,salary,name,experience etc using the file operation. plz help me! Urs PriyaJaiGanesh Software Development c++ file-system | |
The System () function call is in C and C++, but I can't seem to find out just exactly what it can do. I use "C++ How to Program", by Deitel and Deitel, but it's silent on the application of System(). Any help would be appreciated. Thanks. PS: For example, … | |
i am taking a cpsc 140 class and i'm a little confused how to begin my assignment. Write a C++ program that reads in an unknown number of characters from the a text file, count the number of words, and print each word in reverse to the screen. Words are … Software Development c++ | |
i've been reading a lot of the posts here to help me learn C. the problem is, much of the code is written for other compilers (i use gcc). i didn't know there was compiler-specific code until i tried to compile code from questions asked here. this seems so backwards, … Software Development c | |
I am working on a program that asks for 2 number between 1 and 100. Its supposed to say how much even numbers are in between these two numbers. Then I need it to list out all the even numbers between those numbers... So far I got it to calculate … | |
hi .... i have written a programm which solves the math equation : x = -b +- square root of b ^ 2 - 4 (a)(c) all / 2(a) programm is really short since am still a beginner so heer it is : import java.awt.*; import java.applet.Applet; public class MathEqu … Software Development java | |
I am taking a class in C and I am having a problem bringing an int through scanf. I have to create a function that will check a date in this format (MMDDYY). So I have set up a scanf for the users input and then I bring it into … Software Development c | |
Hi Integers ahve a range from -32.767 to +32,767. How come I can use the following code: int a = 1000000; int b = 5000000; int c = a + b; cout << c << endl; ... and it works? Thanks Frank Software Development c++ | |
Can someone point me in the right direction on implementing a merge sort. Here is what the main program will look like. THanks. [CODE]int main(void) { int ar[100]; int i, v, len; for (i=0; i<100; i++) { cout << "enter a number (-1 to quit): "; cin >> v; if … Software Development c++ | |
hi, in turbo C the maximum array size i am able to specify is array[250][250].. what should i do to enlarge this size to say..array[512][512].. i dont know a thing about memory allocation, so please help me out/.. :-| Software Development c | |
I am new to C++ and so how do i start my first programs. Can some one tell me what i need to do first. Also can someone send a free online C++ book? Software Development c++ | |
Hey everyone. Been doing C for a little while now and this website has helped me in advancing my knowledge and skills in C programming. I have another question now... it's really bugging me actually... I'm trying to make a program basically just encode and decode. It seems too simple … Software Development c | |
hi, just a quick question i have created a program to input 6 numbers, but the problem is that i need it to subract the highest and lowest numbers then add the remaining numbers left. im new to "c" and cant figure this out i just need someone to point … Software Development c++ | |
i am trying to avg scores but i keep getting errors, can someone please help me. [code] #include "stdafx.h" #include <iostream> using namespace std; const int SIZE =3; int main() { int sum=0; int tests[SIZE]={0}; float average; char terminate; cout<<" Enter test1:"; cin>> tests[0]; cout<<"Enter test2:"; cin>> tests[1]; cout<<" Enter … Software Development c++ | |
im studying programming fundamentals..I dont know what is the commands and syntax of c language, pls can u give me some definition and information about c language...thnks!!!!!!!!! ;) Software Development c | |
How can i find out the Max and Min value from a Vector, what's the function can i use to do that? max_find() e.g. double x[]; double x_max; double x_min; x_max = max_find( x ); x_min = min_find ( x ) ; Software Development c++ | |
guys, i need your help. please... i need to make a function which compares 2 values if they are equal up to 1,2,3,4,5 significant figures. it needs 3 parameters: x1, x2 (the values to be compared) and sf (the # of sign. figures) i think i need to subtract x1 … Software Development c | |
I am working on a time card program in Visual C++ (FYI: I am VERY new to this, so, please, be gentle with me) :) It compiles with 0 errors and 0 warnings, but when it executes I get an error message that the program needs to close. When I … Software Development c++ | |
Hello, This is my first post. Anyway.. I am having trouble with my c++ program. My assignment is to read from a file a 2-Dimensional array. However, when attempting to do so with my code, which i'm guessing is faulty, I keep getting this error while using Borland Turbo C++ … Software Development c++ first-post ios | |
I can't figure out how to keep it from running off the array and going crazy. I tried a few functions, but they either get rid of my output or funk it up. I want the knight to be a 3 the kill spots a zero and everything else a … Software Development c | |
I ran my C++ program and got these error messages. I have no idea what they mean. :?: Will somone please help. error LNK2019: unresolved external symbol "int __cdecl GetInformation(int,int,int,char (* const)[15],char (* const)[15],float * const,float * const,float * const,float * const,float * const)" (?GetInformation@@YAHHHHQAY0P@D0QAM1111@Z) referenced in function _main fatal … Software Development c++ | |
I am a java programmer trying to understand a c++ oddity that I ran into. My c++ program writes a few MB of data using ofstream. Just before the program ends I close the ofstream. However when the program terminates, the amount of free memory on my linux box has … | |
I am trying to write a program that takes a series of numbers input by a user and performs some calculations on it. While I have most of the code put together and working perfectly fine, I haven't been able to write code that will refuse the users input if … | |
please help me guys. Software Development c | |
Hi, this is the first time that I've used C. Anyway, I downloaded a C compiler (dev-C++), and I typed in this: #include <stdio.h> main() { printf("Hello, world!\n"); return 0; } When I run the program, it doesn't print the "Hello, world!", but I just see a dos window quickly … | |
can anyone explain this programing codes? proc1.c #include <stdio.h> int main() { int fork_return; fork_return = fork(); printf("PID=%d, PPID=%d, fork_return=%d\n", getpid(), getppid (), fork_return); sleep(10); /* wait for 10 sec */ return 0; } proc2.c #inlcude <stdio.h> int main() { int chpid=fork(); if (chpid < 0) { printf("ERROR\n"); exit(1); } … Software Development c | |
hi..im new here and i am having trouble with my program..using DOS-based C++, i have to create a program that will use a mouse pointer but unfortunately i don't know how to create one because that is beyond our topic..so if anyone could help me..please give me the code and … | |
Hi, This is really a logic problem more so than a stright up C++ problem. For class I have written a program that takes dates from a text file and then finds the number of days from January 1st 1800 that days is. The program also has to be able … Software Development c++ | |
Can anyone tell me the complete algorithm analysis of Tower of Hanoi for n pegs and n disks.I really need it :sad: | |
I am writing a turtle graphics program and I need help with 2 characters to show when the direction of my turtle is up or down. I am using cout << ">"; cout << ">"; for right and left and right directions. Any help will be greatly appreciated since my … Software Development c++ | |
Here is my problem. My code consist of two edit boxes: IDC_BOX_1 and IDC_BOX_2. and one button to Execute. The idea is for someone to enter a number in the first edit box, IDC_BOX_1, and after pushing the Execution button, the number in IDC_BOX_1, gets multiplied by two and displayed … Software Development c++ visual-studio | |
hey i was wondering if someone could help me with this problem. i am so incredibly and utterly confused. here it is... write a simple phone directory program that looks up phone numbers in a file containing a list of names and phone numbers (called input.txt). the user should be … Software Development c++ |
The End.