Posts
 
Reputation
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #2K
~2K People Reached
Favorite Forums
Favorite Tags
c++ x 12
Member Avatar for hansel13

This subroutine is very basic, however I am struggling. When the user types q (or Q) into the input when asked for the vendor name, the program should return false... However, this function is always returning true. MY if statement is clearly not working: (*vendorName != 'q' || *vendorName != …

Member Avatar for hansel13
0
182
Member Avatar for arshad115

i have made this strstr() function,it gives the correct answer if it finds the correct string inside the another but the program crashes if it does not find the string,gives a runtime error,compliler does not give any error! here is my code: [code=c++] char *astrstr(const char *s1,const char *s2) { …

Member Avatar for ArkM
0
245
Member Avatar for ward.605

I am trying to sort an array and eventually get the 'n' closest numbers to the position the user chooses but i can't get the sort function to work first. Here's the code: #include <iostream> //for standard I/O #include <iomanip> //for setw(), etc. #include <cstdlib> //for rand(), srand() #include <ctime> …

Member Avatar for vmanes
0
88
Member Avatar for vmarc29

Hi all, i made some java few time ago and i'm now studying C++ here is a simple program i've been working on to learn about it but the fact is for some days now i can't figure why it doesn't work... in fact i just want to create an …

Member Avatar for vmarc29
0
161
Member Avatar for Vallnerik25

I have a question regarding when to use delete to free memory used by a pointer. I have a class function that uses dynamically allocated memory and I want to properly use delete to free up the space when I am done with it. [code=c++] // Overloaded addition operator. CSimpleString …

Member Avatar for Vallnerik25
0
233
Member Avatar for kinsey

Hi, I need some help with a C++ assignment. I'm supposed to write a Hangman program that will: The user should be able to choose between playing against the computer, or against another human. The only difference will be how the word to be guessed is selected: If playing against …

Member Avatar for vivekc++
0
829
Member Avatar for homeryansta

I have a linked list of operators ()+-*/ , how would I be able to compare them if they are all of type char? I looked at the ascii table, but they are all out of order so that isn't a choice.

Member Avatar for homeryansta
0
108
Member Avatar for vivekc++

[code=cplusplus] #include<iostream> #include<list> using namespace std; int main() { list<int> dob; for(int i=0;i<5;i++) { dob.push_back(i); } for(int i=0,list<int>::iterator itr=dob.begin();i<3;itr++,i++) cout<<*itr; return 0; } [/code] errors-- test.cpp: In function `int main ()': test.cpp:17: `iterator' specified as declarator-id test.cpp:17: extraneous `int' ignored test.cpp:17: `int list<int, allocator<int> >::iterator' is not a static member …

Member Avatar for Ancient Dragon
0
159