Beginners - March 2012 (Page 9)

arrays
 
Im working with arrays and i have my array int thesenumbers {6,12,5,9,15}; I want to have the user input a number to assign it for thesenumbers so that i...
[2 replies] Last: never mind got it! int thearray ; cout << "enter two numbers" << en... (by hulibarri)
Linker error SDL
 
I followed a tutorial on youtube and various other tutorials i found and i cannot get a window to appear. I am getting a "error LNK2019: unresolved external sym...
[no replies]
copying string from one string pointer array to another
 
if(temp>final_hash_index_one) { string *tmp = new string[temp+1]; std::copy(level_two, tmp, final_hash_index_one+...
[1 reply] : std::copy( level_two->begin(), level_two->end(), tmp->begin() ); or ... (by vlad from moscow)
Sentimental Not Working Correctly
 
#include <iostream> #include <iomanip> using namespace std; void main() { cout << endl; cout << setw(34)<<"Weekly Payroll Report \n"; cout << "--...
[4 replies] Last: ? (by Sunny101)
Text Adventure game help.
 
We are attempting to code a Text Adventure, similar to Zork... Mainly, we suck. :D So, yeah. Do you guy's see anything wrong with this code? #include <cstd...
[4 replies] Last: Thank you for the help we got the program working kinda but we got pas... (by Purple Dizzy)
String concatenation
 
Hello, I have a class class Parameters { protected: double s_a, phi_a; double s_b, phi_b; double s_c, phi_c; double s_d, phi_d; ...
[7 replies] Last: I guess using map will do it for now since I have to do some sort of p... (by Marioqwe)
How do i store arrays in a queue?
 
can some body please give an example of how to store entire arrays of integers into queue's? queue<int>myqueue; int array =[1,2,3,4] int p =[1,2] myqueue...
[5 replies] Last: no i don't want to store individual elements of the array into the que... (by rro0035)
by hvigil
Can you use two data types in a function
 
I was wondering can you use two data types in a string like int char function( int 5 , char b) Or do i need to use a function string?
[4 replies] Last: that seems to work, you can put in if( denum1 == denum2) num_answer =... (by ui uiho)
red black tree for balanced binary search
 
I am a little confused on how to define the red and black lines(especially the red ones) in the balanced binary search tree. Besides, is there any principal rel...
[no replies]
Need Help with loop.
 
Hello everyone. I'm quite new to the programming world, but after few weeks of learning i made a programm that calculates the roots of a quadratic equation,but ...
[7 replies] Last: So finally i got it working and understood how the loop works! #in... (by Emerican)
Shifting Array elements
 
Hello, I working on this program for school which reads two numbers from a file and then breaks the numbers down to single integer array elements (less than 10)...
[5 replies] Last: You are correct. I should have not used i as the index for the Number... (by histrungalot)
by marc06
compilation Error with template
 
Hello, I have an error at compile time for a template. Here the declaration : template <USHORT16 maxSize,typename Element> class ArrayDataType ..... t...
[2 replies] Last: I think this is something that was improved in C++11. When that gets,... (by Stewbond)
by I3lue
nested while
 
I'm trying to do some nested whiles with y=x*z/(x-z) so x goes from 1-5 and increment by 1 z goes from 2-6 and increment by 1 this is what i have so far...
[2 replies] Last: Oh I needed to put the cout in the inner loop..... thanks =) (by I3lue)
by XXL66
DWORD confusion
 
Hello, I'm trying to protect my app with a hardware dongle. These dongles have a unique ID like f.e. C8F25797, however in the software examples this HID is d...
[1 reply] : C8F25797 is in hexadecimal. If you are reading or printing the number... (by Disch)
what am I doing wrong with this string?
 
void sequence (string str1) { char recent = str1 ; cout << recent; for (int i = 1; i < str1.length(); i++) { if str1 > recent { cout << str1 ; re...
[2 replies] Last: yup found em both. boy does my username suit me somedays xD. Thanks fo... (by Cplusplusnoob95)
function problem
 
Hi guys, I'm really new to this. The problem is that I have to write a int function to get the lowest number out of 5 numbers, and the another float function to...
[2 replies] Last: Thanks, this really helped alot. Enjoy! (by Davester)
by balv11
return function
 
#include <iostream> using namespace std; int getScore(int test1, int test2, int test3, int test4, int test5) { cout << "Enter 5 test scores(...
[4 replies] Last: Hi looks like we are sitting with the same problem, but how do I get t... (by Davester)
by Lej
I cannot GET THIS TO WORK.. (Saving a STRING into an array...)
 
All I want to do is ask the user to enter words, then I bubble sort them alphabetically, then print them back out. THE PROBLEM IS.. When I try to store "str" in...
[5 replies] Last: Well it looks like he's using C, not C++. So std::string is not an o... (by Disch)
Forced typedefs.
 
Hello, To help prevent logical bugs, I'm using a series of typedefs to separate conceptually different variables that use the same type. For example, 'NODE' ...
[3 replies] Last: http://bytes.com/topic/c/answers/139957-built-type-inheritance Using ... (by R0mai)
Nothing to Build
 
Hiiiiiiii guys. Right, so, I have absolutely no idea what I'm doing, this is quite literally my first ever C++ program and it frightens me tbh. I'm doing the 'H...
[11 replies] Last: Thanks for the replies. I tried running the executable directly (not ... (by TimMarc)
March 2012 Pages: 1... 7891011... 71
  Archived months: [feb2012] [apr2012]

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