Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
13
Posts with Upvotes
10
Upvoting Members
10
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
5 Commented Posts
0 Endorsements
Ranked #585
~20.0K People Reached
Favorite Forums
Member Avatar for coroshea

I chose to enter 4 months during runtime. I decided to test out the member functions/dynamic feature of linked lists, by then adding 3 months before compile time (static binding), which would be appear after the first 4 months. The program outputs: > Full list again: > Month January, had …

Member Avatar for coroshea
0
275
Member Avatar for anuragcoder

Hi! I've encountered another problem, The code below is just the part of the code where the error occurs int FindStr(FILE *f, char *str) { int s_pos; //string position in the text int c_pos; //char position in the text char *string; char ccnt; //char count s_pos = -1; c_pos = …

Member Avatar for thunderox
0
11K
Member Avatar for Hyiero

Making a Game for a school project and Im using a 2D array to make the gameboard. Well in the begginning of the game the user has to input what the current game board looks like. I have it so the user is entering data and the data is being …

Member Avatar for Hyiero
0
140
Member Avatar for karthik.chopper

Hey guys, I have a problem. I created a quick sort program and it functions perfectly for quantity less than 100. I searched for errors and changed and now for more than 100 values, it runs perfectly and sometimes it hangs. I am unable to decipher whats the error. Did …

Member Avatar for mbulow
0
404
Member Avatar for Hojjat.Mojallal

There are n persons numbered from 0 to n - 1 standing in a circle. The person number k, counting from the person number 0, is executed. After that the person number k of the remaining persons is executed, counting from the person after the last executed one. The process …

Member Avatar for Hojjat.Mojallal
0
374
Member Avatar for SacredFootball

I think the code comments show what is needed. Essentially, I just need to spit out the members name and score who are below the average score in the list. [CODE] void displayLowScore(struct payload *arrayStart , //first element of array struct payload *arrayEnd ) //last element of array { int …

Member Avatar for SacredFootball
0
154
Member Avatar for skips

I am not looking for an explicit answer to this question, and I have googled/searched this site for hours trying to find an example to work off of. What I can't figure out is how to write a nested "for loop" that will allow the user to input one number …

Member Avatar for skips
0
136
Member Avatar for ableg02

How can I write a for loop that will help me run this twice so that I won't have to re-type code for other data type Student variables? Student S1, S2; for (int x = 1; x < 3; x++) { cout << "Enter First Name: " << endl; getline(cin,Firstname); …

Member Avatar for ableg02
0
98
Member Avatar for shabbo_03

im doing a college project in c++. it is a token system of bank(line,queue..).it waits for a enter key and then it creates a token with entry time and expected leaving time,cashier to attend to and token no. whenever i compile the program it gives no error but after runing …

Member Avatar for mbulow
0
350
Member Avatar for Rallici

Windows 7 Dev C++ version 4.9.9.2 Hello I am fallowing the wrath lands game creator tutorial and I am having the following problem. [CODE]Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Proj\Nimph\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Proj\Nimph\Makefile.win" all g++.exe main.o battle.o town.o crossroads.o helper.o player.o -o "Nimph.exe" -L"C:/Dev-Cpp/lib" crossroads.o(.bss+0x0):crossroads.cpp: multiple definition of `player' …

Member Avatar for Rallici
0
236
Member Avatar for new2programming

I am trying to use the playsound function i have the code [CODE] PlaySound(L"C:\Documents and Settings\Louisa\My Documents\Visual Studio 2010\Projects\Ninja_Wars\Ninja_Wars\music.wav",NULL,SND_FILENAME|SND_ASYNC | SND_LOOP); Sint32 delta;[/CODE] But when i play the game all i hear is a beeping sound- the one windows has when there is an error or something. Can anyone help …

Member Avatar for nbaztec
0
103
Member Avatar for Shaida

[B]I've written a code but it doesn't run! I can't find the problem and the Error is : Declaration Syntax Error will anyone help me?! :)[/B] [CODE] #include<iostream.h> void hi(void); void name(void); int main() { int m; cout<<"Enter one of numbers below:\n"<<"1.Hi\n"<<"2.Name:"; cin>>m; switch (m) { case 1: hi(); break; …

Member Avatar for Shaida
0
2K
Member Avatar for aaronmk2

The if statment I am using in my main program is not working, it should return the else value, but is returning the information in the if part of the statment and then it causes a run time error. I am not sure what is going wrong. [CODE] que1.add("Fish"); que1.add("Whale"); …

Member Avatar for mbulow
0
133
Member Avatar for Alex_

this is what i'm doing.. [code=c++]cout << "Value:" << endl; cin>>it; //it is int cout<<1; for (pos = v->begin(); pos != v->end(); pos++) { // pos is an iterator and v is a vector<int> if (*pos < it) { v2->push_back(*pos); cout << *pos << endl; } } cout<<2;[/code] This is …

Member Avatar for Alex_
0
1K
Member Avatar for mugilan

Hi friends, I am new to c++, just find this example from the book, but when i try to run in my visual studio,its gives problem. there is no error in the codes, it compile well, and in main screen ask the user to input the selection that they want, …

Member Avatar for mugilan
0
144
Member Avatar for JStarr

Hello all, I'm trying to do this homework assignment but I keep getting an error when it compiles. The problem it has is in the startlotto function but I can't find it. It says that I have 2 errors: "error C2143: syntax error : missing ')' before ';'. "error C2059: …

Member Avatar for JStarr
0
113
Member Avatar for jimJohnson

For the following function can one of you guys take a look and see if what I have at the bottom is correct.. [CODE] void f(char ch) { if (('A' <= ch) && (ch <= 'H')) { f(ch - 1); cout << ch; } else cout << endl; } [/CODE] …

Member Avatar for wade2462
-1
92
Member Avatar for etisermars

Hello, I have a simple question. Look at the following code: [CODE]class ClsA { int * var1; ClsA(); ~ClsA(); } ClsA::ClsA(){ var1 = new int [10]; } ClsA::~ClsA{ delete [] var1; cout<<"Apel destructor"; } void funct(){ ClsA ** p = new ClsA * [10]; ..... delete [] p; }[/CODE] When …

Member Avatar for mbulow
0
133
Member Avatar for blackmagic01021

I am sorry to bother people with silly questions, But I have no choice. I have a statement unsigned short a=4000, current_word; current_word=a << 3; Then I have another statement unsigned long a=4000, current_word; current_word=a << 19; According to my knowledge they will contain the same value. Am I right?

Member Avatar for mbulow
0
137
Member Avatar for ferenczi

Hello everybody, I would link to represent a graph with incidence lists. This picture is what I've thought about: [URL="http://img697.imageshack.us/img697/2640/incidence.jpg"]http://img697.imageshack.us/img697/2640/incidence.jpg[/URL] This is what I created: [CODE] #include <cstdlib> #include <iostream> using namespace std; class Edge; class Pointer; class Node { public: Node* nNext; Pointer* incList; char First; Node(char a) : …

Member Avatar for ferenczi
0
112
Member Avatar for broli100

Hi, I am making application where I need to repaint windows form where I display some variables. I used InvalidateRect(NULL,0,0); - now the form is refreshing but started to blink because I refresh whole area,and I dont need to refresh all the buttons and static text ,only area where I …

Member Avatar for broli100
0
103
Member Avatar for aleX_X

It only has one player, and no it isn't that technical on the rules of soccer. If the ball gets out of bounds there is no penalty shot, it just respawns randomly on the field. My problem is in my lookatball funtion I think, but I am not sure. Sorry …

Member Avatar for NathanOliver
0
208
Member Avatar for maryam ahmad

this is a program to change the case of all letters input by the user to small. im getting the right output with this coding. the problem is that its giving some staircase type structure as the output as well. HOW DO I GET RID OF THIS EXTRA STUFF? [code] …

Member Avatar for maryam ahmad
-1
141
Member Avatar for dflatt

hi i'm trying to write a program that compares and manipulates certain characters from a string. heres the bit i'm having trouble with. [CODE] char c; if(c <= a && c >= x)//obvious error //do something [/CODE] is there anyway i can get this to check if 'char c' lies …

Member Avatar for dflatt
0
114
Member Avatar for Sinaru

I wrote this code for fun. Wanted to do such a thing so that I would be able to use this in the future. I'm kinda new to this forum. I like to know what you think about the code. If can point out some mistakes or ways to improve …

Member Avatar for mrnutty
1
181
Member Avatar for ollie60

I am trying to develop a function in a linked list that outputs in a specific manner however I am getting compile errors. Tis is the code: listelement.h [CODE]virtual void out(ofstream& myfile) = 0;[/CODE] list.h includes listelement.h [CODE]void OutList(ofstream& myfile);[/CODE] list.cc includes list.h [CODE]void List::OutList(ofstream &myfile){ ofstream file; file.open("tris.dat"); if(myfile.is_open()){ …

Member Avatar for ollie60
0
100
Member Avatar for GAME

Is there a easier way to do multiple send keys instead of just having to C/P? [code]SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}"); SendKeys.Send("{TAB}");[/code]

Member Avatar for mbulow
0
108
Member Avatar for yigster

[CODE] #include <cstdlib> #include <iostream> #include <cmath> #define width 5 using namespace std; void SelectionSort(double array[][5], int height); int main() { int height; int i,j,lab,midterm,final,number; float avglab,avgmid,avgfinal,totallab,totalmid,totalfinal; cout<<"Number of students: "; cin>>height; cout<<"\n"; double array[height][5]; for(i=0;i<height;i++) { cout<<"Please enter student number: "; cin>>number; array[i][0]=number; } cout<<"\n"; cout<<"Please enter Lab scores.\n"; …

Member Avatar for yigster
0
254
Member Avatar for ollie60

Hi I am having issues populating a vector using "new" where nodeVec is a vector where each entry consists of another vector with 3 elements. zMap is the vector I am trying to populate with the sum of the squares of the first two elements for each entry in nodeVec. …

Member Avatar for ollie60
0
107
Member Avatar for smcp

Hey guys, I'm looking to add on to a recent program of mine that uses classes. My next step is to add in a working overloaded equality function in order to compare the gross pay of two Employees within the class. Now, I've read up on this quite a bit …

Member Avatar for mbulow
0
714