49,761 Topics

Member Avatar for
Member Avatar for pandaEater

I'm making a hash table using a linked lists to handle collision. So I'm creating an array of "head" pointers to access each linked list. I can't figure out why I'm getting the error below: error C2440: 'initializing' : cannot convert from 'LinkHash::ListNode' to 'LinkHash::ListNode *' I commented **not working** …

Member Avatar for pandaEater
0
246
Member Avatar for apautz22

I am working on the UVa problem 10032 - Tug of War, where I'm given the time constraint of 3 seconds to solve the problem. I have pasted the criteria for the problem below. [INDENT]A tug of war is to be arranged at the local office picnic. For the tug …

Member Avatar for apautz22
0
782
Member Avatar for Sohelp

Sinx= x- (x3/3!)+ (x5/5!)- (x7/7!)+....... I can't solve it Please help me........

Member Avatar for mrnutty
0
117
Member Avatar for therobot

I'm pretty sure there's just a small bug I'm missing, but I can't seem to find it. Error: g++ -Wall Proj3.cpp -o proj3 -pthread Proj3.cpp: In function âvoid initLockVar()â: Proj3.cpp:52: error: expected primary-expression before â{â token Proj3.cpp:52: error: expected `;' before â{â token Proj3.cpp:256: error: expected `}' at end of …

Member Avatar for therobot
0
2K
Member Avatar for gastonci

It may be the compiler, but it just doesn't work. The program it's suppose to return the string "a m". [CODE] #include <iostream> #include <string> int main(int argc, char *argv[]) { std::string x = "hola mundo"; std::cout << fromto(x.c_str(),"l","u") << std::endl; return 0; } [/CODE] [CODE] const char* fromto(const char* …

Member Avatar for gastonci
0
199
Member Avatar for hl1202

Hi all, i'm working on some exercises which i have to load data from Image library. I write a load function and it work fine except when the number of images in the library becomes large. At this moment, the limited number if around 700 images. When the number reaches …

Member Avatar for vijayan121
0
265
Member Avatar for urbangeek

hi guys, i'm just starting out c++. Now the problem is, no matter whatever program i write, i'm getting this warning. [QUOTE]#warning This file includes at least one deprecated or antiquated header. \ Please consider using one of the 32 headers found in section 17.4.1.2 of the \ C++ standard. …

Member Avatar for urbangeek
0
298
Member Avatar for heidik

Hello everyone I am trying to find duplicates for part of a string, not the whole stHello everyone I am trying to find duplicates for part of a string, not the whole string. The strings are stored in a file. Each line of file contains a string and many of …

Member Avatar for vijayan121
0
132
Member Avatar for ashmew2

Hi , I am basically working on a snakes game in C++. I have managed to move the snake around on the screen with the WASD keys . The snake is a result of a looped putpixel() functions in the ancient graphics.h Borland file. I was hoping to find solution …

Member Avatar for Luciusduplantis
0
167
Member Avatar for hariprasadrao

i've started learnin OOPS lately... and i hav a question... check it out... i started studying abt friend class and friend functins... a friend function program... now, how can i write a progarm 2 add two complex variables... can i use: void getdata() { cin>>a+i; cin>>b+i; } to input two …

Member Avatar for Luciusduplantis
0
105
Member Avatar for Violet_82

Hi there, I have a question about a really simple program. The code below doesn't work, the compiler comes back with "fatal error C1083: Cannot open include file: 'ofstream': No such file or directory": [CODE]#include <iostream> #include <ofstream> using namespace std ; int main( ) { ofstream myfile("newfile.txt") ; myfile …

Member Avatar for Violet_82
0
194
Member Avatar for ichigo_cool

I've been doing research on data structures but I just can't really wrap my head around what they are. I'm thinking classes, enums, structs are data structures; but then I also see linked lists and queus, etc that I don't understand either. Could anyone tell me what they are, what …

Member Avatar for invisal
0
188
Member Avatar for Dazaa

I am writing another header file. And I am still trying to get my head around these templates. They seem extremely easy to understand but I have had the compiler moaning at me for the last 2 hours. This is what i have: [CODE] #include <iostream> #include <cassert> using namespace …

Member Avatar for Fbody
0
6K
Member Avatar for homeryansta

Greetings fellow programmers! I'm doing a computer vision project in my AI class and am looking for some tips. My task is to read a bitmap into memory and alter that image file and find an object within it. In my case, I'm searching for a box that appears in …

Member Avatar for Taywin
0
147
Member Avatar for atramposch

I have no syntactical errors, but i cant figure out why this wont work. Heres the code. [CODE]#include <stdio.h> #include <string.h> #include <ctype.h> #include <math.h> int main (void) { char str[100]; int i = 0, line_count = 0, len = 0, alpha = 0, lower = 0, upper = 0, …

Member Avatar for Taywin
0
312
Member Avatar for timb89

im trying to get my code to perform dijkstra's algorithm on my adjacny matrix, it works great for the inital row (0) but i cant get it working for any other value?! [CODE]void dijkstra (int a[size][size], int matSize, string CityID[size]) { string startCity; cout << "Enter start city : "; …

Member Avatar for Taywin
0
147
Member Avatar for jmcorpse

I want to say thank you to everyone in advanced for all the help that has been provided. I am currently stuck on two more items on this program. Currently I am completely stumped on how to create a bar graph using the information gathered by the program. Some reason …

Member Avatar for jonsca
0
98
Member Avatar for tech9x

my program is to open a input file, i do not know what words is in the file, and i have to open a command file (a text file), the command file is to tell the program what word to search and what to do, also i do not know …

Member Avatar for WaltP
0
113
Member Avatar for adaniel058

[ATTACH]17854[/ATTACH] [ATTACH]17855[/ATTACH] [ATTACH]17856[/ATTACH] Guys I am trying to help a friend of mine with this project they have due in a few days and because I program in Java mainly I am a bit rusty with this. I can not figure out why my getInput function shows up under the …

Member Avatar for adaniel058
0
136
Member Avatar for Rez11

The point of the program I am making is to have a pure abstract base class called BasicShape and have 2 child classes, Circle and Rectangle. I have the program written but with one unresolved error. [B]Main.cpp file[/B] [CODE]#include "Pure.h" #include <iostream> using namespace std; int main() { Circle pizza(2,2,10); …

Member Avatar for Rez11
0
965
Member Avatar for watery87

Hi guys, im having problems verifying date. My exact problem is that even if user inputs an incorrect condition, the system still stores it into the class. My question is, where do i put the conditions so that the error gets printed AND the user gets to reinput that value …

Member Avatar for watery87
0
119
Member Avatar for Dazaa

I am sure there is nothing wrong with this... I am racking my brain as to why it wont compile. [CODE] #include <iostream> #include <string> using namespace std; class Vehicle { public: Vehicle(); Vehicle(string m, int y); void print() const; protected: string model; int year; }; void Vehicle::print() const { …

Member Avatar for group256
0
102
Member Avatar for Hawkpath

Hi, I'm trying to create a simple program in Win32 and I can't find how to accept input in the form of text. Like "What's your name: ___" then the user enters their name and my program can evaluate the input. I have already googled this for a long time, …

Member Avatar for Frederick2
0
472
Member Avatar for triumphost

kk so I am having a problem on a mac where the audio doesnt work very well unless my finger is on the touchpad... it works perfectly smooth... I want to write code to detect whether the finger is there or not and if it isnt then move the mouse …

Member Avatar for triumphost
0
177
Member Avatar for emko

Hi, I need to make a simple calculator that just does addition and subtraction. But the program should keep a running total of the calculations entered like this: sum = 0 12 + 3 sum = 15 5-2 sum = 12 1+1 sum = 13 But it also needs to …

Member Avatar for emko
0
393
Member Avatar for timb89

anyone have any ideas? for some reason uni forgot to include lectures notes on this, yet decided to base homework on it. i get the general idea just not sure how to implement it.

Member Avatar for SasseMan
0
3K
Member Avatar for vijay.neo

Hi friends, As i a writting small C program to pass the structure pointer in the function. i am endup with small problem, plz let me know how to crack this one? ///////////////// [code] void function1(void *); void main() { int size_offset = 0; typedef struct { int a; int …

Member Avatar for ahmad chehade
0
204
Member Avatar for arithehun

I have joined our local high school's FIRST robotics club, but their programmer graduated last year, so who got selected? The wimpy freshman: me! I am an intermediate programmer (PLEASE don't look at my previous posts, I now know two languages, and am better). So I downloaded an instruction booklet. …

Member Avatar for arithehun
0
1K
Member Avatar for gizmo7008

For my class, I am creating a rock paper scissors game. My code is not all the way done, but I am stuck on a certain part of the process. For some reason, I am getting errors on the "==" in: [CODE] while (true) { human = humanChoice(); computer = …

Member Avatar for gizmo7008
0
212
Member Avatar for somon

Hi, Please can anybody help me a little bit with my assignment , The thing is that I was kinda ill , so i missed many important lessons, but now teacher told that i need to do assignment, Can anybody help me with beggining , * we use Xcode. 1. …

Member Avatar for m.e.nergiz
0
119

The End.