General C++ Programming - September 2011 (Page 25)

error: no match for ‘operator[]’
 
hi everyone, i have written a code in c++. first i created a structure "elements". then declared a array "m" of datatype "elements" in the main(). When i passe...
[9 replies] Last: [quote=Moschops]I regularly pass just a pointer to an array. It's comm... (by closed account 1vRz3TCk)
Hash functions
 
Having trouble finding information regarding hash functions. Does anyone know if the table size used to store numbers is pre-determined by the programmer or if...
[no replies]
text to array HELP!!!!!
 
ok, im supposed to import a .txt file... it has a 20x20 grid with random numbers like so 01 23 21..... -> 20 numbers by 20 numbers 34 41 21..... and fill...
[3 replies] Last: Well I told you what was wrong with the code that you posted. If you w... (by Galik)
Passing an Array of unassigned size into a function
 
What I'm trying to do is get a function that can accept an array of an unassinged value into it. Something like as follows; func1(){ int array1 ; // c...
[4 replies] Last: Thanks Duoas, that worked a treat! (by Hibblejaybob)
by lab3
Classes Help
 
I have this piece of code and once i run it the same error message keeps recurring ... its been a while so I'm not sure what's the problem. A little help will b...
[3 replies] Last: No problem. (by Mathhead200)
Need help with problem in my linked list class
 
Hi, so I'm making a singly linked list class that is supposed to hold Term objects that make up a polynomial. I want the terms to be sorted from highest expone...
[1 reply] : //Line 60 if ( cur->item == exp || cur->item > exp) break; /* * Yo... (by Mathhead200)
operator+ overloading inheritance prob
 
Hi guys, given a base class "vec" and a child "vec3d" with common data template<typename TYPE> class vec{ public: TYPE* val; int size; public: vec(); ...
[7 replies] Last: IN FACT the error arose from lacking const-correctness... :( ANYWAY:... (by ZED0815)
C++ Char Array No Set Value
 
Hello :D I am making a console app in Visual Studio 2010 C++ and I was wandering if it is possible to make a char array that does not have a set value. c...
[2 replies] Last: Thanks :D (by Muhasaresa)
Question about reading files
 
Hello, I have run into something odd and wanted to know if anyone could help me. I have written a program which opens a file for reading and utilizes “inFile....
[no replies]
C++ Console Color Change Over Time
 
Hello :D I am making a console app in DEV C++ and I am trying to make it so that the backround color of the application changes every 500 milliseconds. I hav...
[2 replies] Last: Oh, sorry, I was silly and failed to notice that "color ff" does not e... (by Muhasaresa)
by zzahra
how to use alglib funcs in my prog?
 
hi I want to know how can I use alglib func in my proggram, I dont have a dll lib of the funcs.my compiler is visual studio 2010. I get the alglib from (http:/...
[no replies]
Wrong cin Input - Program Getting Out of Control
 
I'm new on C++ programming and I tried to write a program to randomly generate some numbers as "Dice Roller". I requested the user to insert the limit of the ro...
[2 replies] Last: Thank you for the solution. Now the program displays the "Please enter... (by Griffiduck)
Xcode Signal 11
 
Program has exited due to signal 11 (SIGSEGV). As I understand it, this error comes from a problem allocating memory, or from memory leaks...I am somewhat new t...
[4 replies] Last: it does sorry, and it was gdb...it's harder to understand than windows... (by paulmcco)
macro
 
hello guys i have on question about macro ! ok i want write one macro which it can calculate some thing like : int cal(vector<int> &v) { int c = 0; for (...
[6 replies] Last: i saw , but not completed ! (by ahura24)
Help with sudoku
 
Hi guys! I was helped by a member in this forum with the sudoku, but i got stuck trying to add some code. I want to add a warning if the number the user adds...
[no replies]
Need help calculating pi. Please help!
 
Hi, So I created this program that uses Chudnovsky's method of calculating pi and am using the data type long double. It turns out I can only calculate pi to ar...
[6 replies] Last: bump (by fearverd)
Help get last two chars
 
So how to get last two characters of a string, Let a user type his desired text that will be stored in a string and how to get last two characters of string and...
[1 reply] : substr: http://cplusplus.com/reference/string/string/substr/ ... (by Disch)
Insert user defined values to MySQL table
 
Hi, how can I insert user defined data to MySQL table? I have this: char queryy ; wsprintf(queryy, "INSERT INTO accounts(acct, login, password, gm, banned,...
[2 replies] Last: char Username ; char Password ; char Email ; maybe this will make u... (by mekkatorqu)
How can i transform this into c++
 
I have to change this GSM telecoms Frequency Encoding Algorithm into a C++ formula so i can build a cin for the user to input their frequency and based on this ...
[1 reply] : The modulo operator in C is %. That's all I can say. I'd need to know... (by helios)
Filling Nested Vectors
 
I have a nested vector named fifo_vec and a vector that is filled randomly with 0's or 1's and this vector is called with the function getChannel. both vectors ...
[4 replies] Last: thank you so much for your help (by forceface)
September 2011 Pages: 1... 2324252627... 31
  Archived months: [aug2011] [oct2011]

This is an archived page. To post a new message, go to the current page.