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

I am having trouble devising a method to multiply 2 matricies that are formed by dynamic one dimensional arrays, for this case i just used matrix1 and matrix2 To access elements that are on rows 0 to n-1 in either matrix i have to use this method: ((rows - 1) …

Member Avatar for kabultanha
0
4K
Member Avatar for littlestone
Member Avatar for cpp_noobsauce

Ok so I posted this before but didn't get a response... Our prof gave us this problem: "Write a program that will get, from the user, a string of characters such as a sentence, and place this into a declared char array. Ask the user which letter they would like …

Member Avatar for Salem
0
234
Member Avatar for littlestone

Does it need a copy constructor and an operator= for a class which have array member? for example: Class A { private: B data_[100]; //B is a class }; does class A need a copy constructor and an operator? in other words, is the default copy constructor is OK for …

Member Avatar for abhijitm
0
193
Member Avatar for littlestone

Some of my source files include the following code. [code] #ifndef AAAAAAAAAAAA #define AAAAAAAAAAAA #if !defined(__lint) && !defined(_lint) XXXXXXXXXXXXXXXXXXXXXXXXX; #endif #endif [/code] I want to delete line1, 2, 6. So, Could somebody tell me how to do it? thank you in advance!

Member Avatar for eggi
0
138
Member Avatar for number87

I am creating a linked list which links a struct of data together. However, this is my problem, if I declare struct Node first then the Event type wont exist, but if I declare struct Event first then nodePtr wont exist....im kinda stuck here as to how I should declare …

Member Avatar for number87
0
438
Member Avatar for shipeshipaca

The following code is part of a program to document the book in my house, like those things they have at public libraries. I learned about minupulating files in programs last night and have many errors in this program. First, the c-style string for filename comes out as - filename.txt" …

Member Avatar for littlestone
0
152
Member Avatar for henpecked1

How do you delete the front cell of an array in an array based circular queue? Here's the Queue cpp functions [code] #include <iostream> #include <string> #include "Contributor.h" #include "myQueue.h" using namespace std; myQueue::myQueue() { front=0; rear =0; Index=0; size= 0; ArrayQ[10]; } myQueue::myQueue(const myQueue &CCmyQueue) { for(int i=0;i < …

Member Avatar for littlestone
0
148
Member Avatar for shamila08

Hi all.... i have problem with number: example: 1234 is equivalent to 1432 ( based on maths concept), then erase/delete 1432 2143 is equivalent to 2341, then erase/ delete 2341, and so on How to program it in C++

Member Avatar for shamila08
0
112
Member Avatar for littlestone

Question is : Write a function [code=c++] int f(char* str, long pattern) [/code] to find out how many pattern does the str contain? str is a char array consist of '1' and '0'; for example: str = "11010101110101011110100011001" ,pattern = 110; My solution is change pattern and str to std::string, …

Member Avatar for vijayan121
0
215
Member Avatar for imtnan

Hello, I am a newbie and trying to pass a 2 - dimensional array to a function in C++ from main(). Then, [B]once inside that subroutine[/B], I want to [B]change the contents of this 2D array[/B] and be able to [B]access the changed elements of this 2D array later[/B] in …

Member Avatar for dougy83
0
3K
Member Avatar for hezfast2

Hello, I'm almost done with this program, but when I want to sell an item (option 2) I get an error after I enter how many 'vector subscript out of range'. The program compiles correctly, but I cannot for the life of me figure this one out. Any Help? [code] …

Member Avatar for littlestone
0
373
Member Avatar for Adrian99420

Hi, I wish to output a string from a textbox to another file, here is what I wrote: [code] FILE*myfile; myfile=fopen("D:\\Profiles\\DqGw47\\Desktop\\hello.txt","a"); fprintf(myfile,"%s\n",textbox1->text); fclose(myfile); [/code] In my hello.txt: Set wallpaper= My problem is how can I control where to fprintf my string. In this example, how can I output the textbox …

Member Avatar for Ancient Dragon
0
139
Member Avatar for littlestone

What will happen if caught exception when new a object? For example: [code=c++] ClassTest* ptr = 0; try { ptr = new ClassTest; } catch(...) { } [/code] if the constructor of ClassTest throw exception, what will happen? will ptr == 0 ? some memory leak?

Member Avatar for Narue
0
162
Member Avatar for mr.cool

I am getting this error and i don't know what it means. this is my code, i do have header files but i didn't include them. [code]int main() { [LIST=1] [*] cout<<"Welcome to guitar hero"<<endl; [*] cout<<"Try and press the correct letters on the line"<<endl; [*] cout<<"You will use the …

Member Avatar for mr.cool
0
99
Member Avatar for jennyebrooke

Okay I'm gonna be honest with you... I have no idea what I'm doing... no not even a little. I'm in an online C++ class that I'm only taking because it was the last required course for me to graduate this semester... This is the last assignment due and I …

Member Avatar for littlestone
0
105
Member Avatar for bustedsfnewkia

I've searched Google and have not found a solution to my problem. Function is to take a parameter and do a calculation on it. Based on the initial conditions it is supposed to return true and the the value calculated via a reference parameter. Basic code before all modification to …

Member Avatar for littlestone
0
101
Member Avatar for scream2ice

i'm trying to write a program that reads a text from the user(keyboard) sentence by sentence and then prints the 'morse code' of them char bay char on a text file. I'm just testing it for the letter 'c' to start with, but it doesn't seem to be working well …

Member Avatar for John A
0
95
Member Avatar for nurulshidanoni

How to change this data sturucture from vector <int> total; to float total;? because if I change it to float teher is many error.... [code=C++] #include <iostream> // std::cout #include <fstream> #include <iomanip> #include <string> // std::string #include <vector> // std::vector<> #include <algorithm> //std::for each() using namespace std; // import …

Member Avatar for littlestone
0
279
Member Avatar for VernonDozier

Hi, I am working on a project wherein one program writes to a file, but allows a different program to read from that file BEFORE the first program is finished writing to it. In this project, the first program is a game. When someone scores in the game, that activity …

Member Avatar for VernonDozier
0
205
Member Avatar for littlestone

For a singleton class, there is only one instance in a process, so it's not necessary to define a member function as static, am I right? Thanks in advance.

Member Avatar for dougy83
0
171
Member Avatar for Cosa

[code] void ChangeAddress() { char searchaddress; char newaddress; cout << endl; cout << "Please enter street name to be changed "; cin >> searchaddress; for (int i=0; i<numrec; i++) { if (strcmp(SubscriberID[i].Subscriber_Address.streetname, searchaddress) == 0); { cout << "Enter the new street name: "; cin >> newaddress; } } } …

Member Avatar for Cosa
0
281
Member Avatar for aminit

Hello all: I create a simple source file in VC++ , I tried something simple,there is two strings: string1:MICROSOFTCPP string2:HELLO I want to write a code to make string2 is equal with string1,so it must be string1:MICROSOFTCPP string2:[COLOR="Green"]HELLO[/COLOR][COLOR="Red"]HELLO[/COLOR]HEL so it seem the string2 its repeat itself until it's length is …

Member Avatar for amitahlawat20
0
115
Member Avatar for littlestone

There are two way to define a character array constant: 1. const char* const OUT_STRING="hello world"; 2.const string OUT_STRING="hello world"; which one is better? why?

Member Avatar for vijayan121
0
59