
please wait
by faieq92
Sorting? Or Searching (1,2,3,4,5,6,7)
|
So this is my code up until now. I want to put in a search option however I don't know what type of search is the most efficient and no clue how to implement. C... |
Dec 31, 2012 at 10:58pm
[133 replies] Last: int x = array ; int i = top - 1; int j = bottom + 1; ... (by faieq92)
|
by princemoon
do while loop
|
Print the sequence using do while loop. * * * * * * * * * * * * * * * * |
Dec 31, 2012 at 8:17pm
[4 replies] Last: That's not a do-while loop, though. (by Athar)
|
by billywilliam
CMD
|
How do you tell a project to output things using cout to the command line? When I 'run' my project (that has almost literally nothing in it besides "cout<<"Hell... |
Dec 31, 2012 at 8:15pm
[5 replies] Last: CTRL+F5 will run it without the debugger, and will hold the console op... (by Stewbond)
|
by Ch1156
How do i put a vector in a class?
|
I tried putting a vector in my class but it wont let me do it it keeps giving me errors. here is my code: #ifndef PLAYER_H #define PLAYER_H #include <... |
Dec 31, 2012 at 6:45pm
[10 replies] Last: In the constructor, you need nothing, it's a class and it gets automat... (by S G H)
|
SDL Mob Class Remake |
Well this is my remake of my last topic, which is buried under 100s of different topics now in the General C++ Programming fourm. Well here it is: I made a S... |
Dec 31, 2012 at 6:37pm
[14 replies] Last: Oh :D Thanks!!! (by closed account N36fSL3A)
|
by Aceix
Easy to solve problem about rand()
|
Why does this give me the same number every time? ie: 3 string fnRandom() { srand(NULL); int nTemp; nTemp=rand()%9+1; if(nTemp==1) {return "... |
Dec 31, 2012 at 6:30pm
[6 replies] Last: Thanks for your help! It makes sense that it is not needed to call sra... (by Rayquaza4096)
|
by metulburr
dynamically allocating array
|
I still dont understand pointers and references really. I found this segment of code somewhere on the forums. I was trying to convert it to a function to help l... |
Dec 31, 2012 at 5:48pm
[8 replies] Last: Yeah, exactly, that's it! The second code also had a memory leak. (by S G H)
|
by princemoon
Simple calender program.
|
I am a calender program which should look like this. S M Tu W Th F S 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 23 24 ... |
Dec 31, 2012 at 5:23pm
[3 replies] Last: #include <iostream> #include <iomanip> using namespace std; //PROTO... (by princemoon)
|
by alirah84
wrong in sort function
|
Hi, This Program shows total salary for each employee but after sorting in sort function It shows dumb salaries. where is wrong in sort function? #include <con... |
Dec 31, 2012 at 4:00pm
[8 replies] Last: Because you can't initialize it that way. May use strcpy() or make i... (by ne555)
|
help me with iterator declaration! |
1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <sstream> 5 #include <utility> 6 using namespace std; 7 8 tem... |
Dec 31, 2012 at 3:37pm
[4 replies] Last: [quote=cppreference] template<typename T> struct S { template<type... (by Catfish3)
|
functors! |
I compile the following code, suggested by someone, but i get the following compilation error: sort_ba.cpp:8:27: error: passing ‘const bankAcct’ as ‘t... |
Dec 31, 2012 at 11:52am
[4 replies] Last: @jinanzhaorenbo Because the comparison function is not supposed to mod... (by Peter87)
|
help me with functors |
Hi, the following is my code, i have two questions: first, in line 7, why can't i make ba1 and ba2 to be reference? second, there are some standard comparis... |
Dec 31, 2012 at 11:33am
[4 replies] Last: why must i put 'const' in this case? (by jinanzhaorenbo)
|
by DPA
Help Me!!!!!!!!!!
|
Dear All I am making a 2-player tic-tac-toe game in c++ (compiler: turbo c++ 3.0) but my code just refuses to work. The program bombs every tiume i try it. ... |
Dec 31, 2012 at 7:27am
[6 replies] Last: no turbo c++ 3.0 does not support namespaces. I know that my compiler... (by DPA)
|
by metulburr
converting one type to another
|
i see numerous different ways of converting one type to another. static_cast<int>(some_float) will convert the float to an int, but yet it doesnt convert for ... |
Dec 31, 2012 at 4:36am
[6 replies] Last: well the str to char i used the same method as char to string char C... (by metulburr)
|
by faieq92
i/o problems
|
void SaveData(Details Data , int size){ ofstream DataSave("test.txt"); if( Datasave.is_open() ) { for(int i=0; i<size;i++){ Da... |
Dec 31, 2012 at 3:54am
[1 reply] : It doesn't know what the class "Details" is. Its not a predefined typ... (by pogrady)
|
by dValdriz
Logical OR isn't working Properly
|
Hello (: I'm learning C++ obviously and my friend let me borrow his C++ book from school called "Beginning C++ Game Programming". Anyways I'm on Chapter Two and... |
Dec 31, 2012 at 12:41am
[2 replies] Last: wow, simple fix. thanks a lot. I need to be more cautious of my errors... (by dValdriz)
|
by Kovs95
Fun with Functions
|
Write a function titled say_hello() that outputs to the screen "Hello" ★ Modify the function so that it takes an integer argument and says hello a number of ... |
Dec 31, 2012 at 12:22am
[11 replies] Last: Ah I used "cout << hello" before but I didn't have the loop right! Tha... (by Kovs95)
|
by vicaddoil
Resize my array
|
Hi I'm new in C++ so anybody can help me of resizing my array? I want to read a txt file and store it in an array: //Load polygon points string data ; in... |
Dec 30, 2012 at 11:25pm
[2 replies] Last: Arrays can't be resized (they can only be recreated with a new size), ... (by Cubbi)
|
by dolacis
little help plz :)
|
when any console application finishes in c++ it types "press any key to continue ... " and it waits me to press any key to close what should i do if i want to c... |
Dec 30, 2012 at 11:12pm
[13 replies] Last: if you didnt put "press any key to continue ... " in your program, the... (by metulburr)
|
by fpiro07
Base-10 floating point data types
|
Is there any way (library, ecc.) to replace the float and double data types with other base-10 ones to avoid the floating point error? |
Dec 30, 2012 at 9:04pm
[6 replies] Last: Does it make any difference the fact that I have the LLVM GCC? Or its ... (by fpiro07)
|