49,757 Topics

Member Avatar for
Member Avatar for AODfan

The assignment my instructor has assigned as for to read an input file and count all 3, 4, 5, and 6 letter words and out put those to an output file. From what data I had been provided by my instructor, I think he wants us to use char data …

Member Avatar for Ancient Dragon
0
114
Member Avatar for stereomatching

my os : windows xp sp3 compilers : gcc 4.5(minGW) IDE : code blocks 10.05 As the title, when I didn't enable the command [b]-std=c++0x[/b] CImg can work with gcc4.5 and code block(after Build Options > Linker Settings > Link libraries > Add and enter gdi32) Or use this kind …

Member Avatar for stereomatching
0
226
Member Avatar for mrnobody

hi, i'm did a program in C++6.0 that retrives data from Access. the program was ok and runs normally for quite sometime and suddenly the error [B]"Unable to Create File Buffer"[/B] appear. After searching high and low for solution and trying multiple suggestions, i found that that problem is because …

Member Avatar for vijayan121
0
326
Member Avatar for fadi_1234
Member Avatar for fadi_1234
0
142
Member Avatar for RyanMcMillan

How Would i be able to check for valid input on cin or getline heres what i have [CODE] #include <iostream> #include <string.h> using namespace std; int main() { string word; getline(cin, word); cout << word; system("PAUSE"); return EXIT_SUCCESS; } [/CODE] what i mean by valid input is either if …

Member Avatar for Fbody
0
538
Member Avatar for plang007

How do I change it so that it will only say how many times the program has ran once I typed another key then [B]y[/B]. Output: ================================= Programmer Name: Peter Langlands Program 3 Description: CS 150 Spring 2011 Lab CRN: Date: ================================= Enter an nonnegative number: 10 a0 = 10 …

Member Avatar for plang007
0
320
Member Avatar for plang007

How would I make this program that it tells me the number of odds or evens. I only have 1 number at the time, so I need it to either say 1 odd or 1 even. [CODE]#include <iostream> #include <fstream> using namespace std; void printInfo(); int nonNegative(int a, int k); …

Member Avatar for plang007
0
1K
Member Avatar for aloth

I'm new to C/C++ and I'm having difficulty with calculating leap years in my Zeller's Algorithm program (based off of the Gregorian Calendar). I've lost sleep over this code for the last week and this is my final breaking point. I continually get "This day is Friday." for input 1 …

Member Avatar for mike_2000_17
0
805
Member Avatar for D2008

i have a empty c++ win32 console program Peter.cpp and a window form John.h added. a error of " error C2061: syntax error : identifier 'John' " just comes out due to the code " Application::Run(new John); " when complie. could you please help me to fix the program? thank …

Member Avatar for pseudorandom21
0
186
Member Avatar for TailsTheFox

Hello, I am looking to simulate keyboard inpout for a computer in general, not just for a window. I was allready told how to simulate keyboard strokes in a certan window, although I just want to simulate them as they might be in general. As in program says "X" and …

Member Avatar for pseudorandom21
0
204
Member Avatar for rbduck09

I NEED HELP!! I'm writing a program where the user inputs the pH Level and it goes and tells if it is a certain solution. Some of them work some don't Can somebody tell me where in my code I am going wrong. I am not asking for the solution …

Member Avatar for Ancient Dragon
0
152
Member Avatar for quintoncoert

can anyone tell me if it is possible to connect to a database (for example an access database) from visual c ++ 6.0? And if one can how does one do it? Is it some wholy complicated thing or is it as easy as doing it in visual basic 6.0 …

Member Avatar for Ancient Dragon
0
759
Member Avatar for g_u_e_s_t

How can I go about concatenating two arrays of char(ex. char boy[] and char girl[]) so that the contents of girl is attached to the contents of boy?

Member Avatar for Ancient Dragon
0
127
Member Avatar for JesseFarmer

I have searched but i can not seem to find an answer to my problem. I have to write a program that lets the user enter their salary, and calculates their salary with a 5% raise for 3 years. When I run the program and enter the value for cSalary …

Member Avatar for Ancient Dragon
0
128
Member Avatar for imhiya

[CODE] #include <iostream> #include <cstdlib> #include <cstdio> #include <fstream> #include <string> #include <vector> #include <sstream> #include <list> #include <limits.h> using namespace std; class Node { public: string name; vector<string> edges; vector<int> dist; }; class Path { public: vector <int> distance; vector <string> fromwhere; vector <int> complete; vector <string> cities; vector …

Member Avatar for rubberman
0
137
Member Avatar for highflyer8

Hi, I am getting an error message when using base classes. The error message is x: undeclared identifier y: undeclared identifier z: undeclared identifier The particle class derives from the fourvector class which derives from the threevector class, as follows. [CODE]#ifndef THREEVECTOR_H // Prevents the class being re-defined #define THREEVECTOR_H …

Member Avatar for mrnutty
0
157
Member Avatar for Craftknight

Alright, I have some questions. 1. This code does make some sense right? 2. I keep getting my failure to open file message, did I make the program do that or are my test files just not working? 3. How do I make the program acknowledge - and + as …

Member Avatar for Craftknight
0
150
Member Avatar for salty11

In this program everything work except the change back, the quarters, dimes, nickels, and pennies wont work, everytihng else works, for my input i used 65.67, which with hst came out to 75.52, the amount tendered was 100. I just need help with getting the quarters, dimes, nickels, and pennies …

Member Avatar for salty11
0
162
Member Avatar for Akill10

Hey, I am having trouble trying to set a default value for a function in one of my classes. Here is where I am trying to set it: [CODE] void Sprite::Spr_Blit(SDL_Surface* source, SDL_Surface* dest, SDL_Rect* clip = NULL) { SDL_Rect offset; offset.x = getX(); offset.y =getY(); SDL_BlitSurface(source,clip,dest,&offset); } [/CODE] Here …

Member Avatar for RyanMcMillan
0
151
Member Avatar for kyxler

I need help to make this program be output *******E * ** *** **O****> *** ** * *******E Thanks for helping

Member Avatar for RyanMcMillan
0
84
Member Avatar for TailsTheFox

Hello, I've been searching the internet and i haven't been able to find anything on my problem. Anyways, I'm trying to read cursor positioning on my screen, and send it to a variable. Just to make things easier, what would I type in the code region for a button; [CODE]private: …

Member Avatar for TailsTheFox
0
159
Member Avatar for taumang

x =5 while(x<7) print the value of x x=x+1 while(x>2) print the value of x x=x-2 so i was thinking that the output of the program will be 5677753 but my program is against my opinion so i want to know the right output #include <iostream> using std::endl; using std::cin; …

Member Avatar for taumang
0
302
Member Avatar for taumang

hi,please help me with this program ,iwant it to print values of x not x #include <iostream> using namespace std; int main() { int x = 5; while(x < 7) { std::cout<<" value of x"<<'\n'; x=x+1; } while(x > 7) { std::cout<<" value of x"<<'\n'; x=x-2; } return 0; }

Member Avatar for Ezzaral
0
100
Member Avatar for daviddoria

If I have this structure: [code] class Parent { public: virtual void MyFunction() {// do something} }; class Child { public: virtual void MyFunction() {// do something else} }; [/code] The Parent::MyFunction() seems to always be called, even with: [code] Child MyChild; MyChild.MyFunction(); [/code] Is this expected? David

Member Avatar for mike_2000_17
0
149
Member Avatar for blee93

This is my failed attempt at creating the Sieve of Eratosthenes. Can anyone spot any problems? I just started to learn the STL, but the concept of iterators and the STL in general is really difficult for me. -The input represents the number of cases. The variable m represents the …

Member Avatar for Narue
0
135
Member Avatar for khayabi

Hai guys, I am a newbie here, maybe you know about my problem. this is VB source code : [COLOR="Red"][B]ReDim[/B][/COLOR] parent.Individuals(maxPop) As Individual [COLOR="Red"][B]ReDim[/B][/COLOR] offspring.Individuals(maxPop) As Individual Do While bil < maxPop bil_gen = 0 [COLOR="Red"][B]ReDim[/B][/COLOR] parent.Individuals(bil).Gen(batas_gen) As Genetik parent.Individuals(bil).Genome = AssignValue(1) List3.AddItem parent.Individuals(bil).Genome bil = bil + 1 Loop …

Member Avatar for WaltP
0
119
Member Avatar for Khoanyneosr

[CODE] // Hangman Redo Program #include <iostream> #include <string> #include <cstdlib> #include <ctime> #include <string> #include <algorithm> using namespace std; //Functions void welcome(); void instructions(); void game(); // Types and Arrays string choice; string inst; int main() { welcome(); return 0; } void welcome() { cout << "\tWelcome to Hangman …

Member Avatar for Narue
0
229
Member Avatar for HASHMI007

#include<iostream.h> struct rectInfo{ float height ; float width; float area; float perimeter; }; /* write a function void gendata(rectInfo * r)to generate and assing values to the height and width member of r(value should be b\w 1 - 20 )*/ void gendata(rectInfo * r) { }

Member Avatar for jonsca
0
89
Member Avatar for JordanHam

[CODE]#define _LL_BUFFSIZE_ 2048 string lastLine; lastLine.clear(); // regardless, zero out our return string char buff[_LL_BUFFSIZE_]; // our temporary input buffer data_filet.seekg (0, ios::end); // go to end of file int length = data_filet.tellg(); // find out how large it is data_filet.seekg(length-min(length,_LL_BUFFSIZE_),ios::beg); // seek back from end a short ways // …

Member Avatar for JordanHam
0
4K
Member Avatar for flyboy567

Hey, Im having some trouble with my code, it doesn't seem to stop to wait for an answer to the question about modifying the phone list when i input values in above and press Ctrl Z enter, however the code works fine when i remove the code about inputting information. …

Member Avatar for Fbody
0
1K

The End.