Beginners - April 2012 (Page 20)

main() "doesn't exists" - can't return
 
Hi everyone, i'm a beginner in C++ and wanted to create something very simple... Now my compiler tells me that he can't return from int exit(); to int main(); ...
[1 reply] : A program is not allowed to call the main() function don't do it. If y... (by Peter87)
Array question?
 
int foo (void) { int i, j, k; int grid ; for (i = 0; i < 4; i++) { grid = 2; for (j = 1; j < = 3; j++) grid = grid + 3; } ...
[6 replies] Last: foo returns 5 is my answer then! Thanks my friend! (by Algar32)
Loop and a half before runtime exception
 
I changed my 2D array call in the proto and def--no linker error this time. This time I tossed in a couple of cout's and found out my loop: read name-5 ints (2...
[2 replies] Last: I'm rather surprised that links. int* is not the same type as int Tw... (by cire)
Help needed(SFML): Creating "pointer array objects" (*object
 
In my game I want a canon to fire bullets once every second, im half way there but it's getting too complicated for me so I need some help. I made a small examp...
[1 reply] : counter is always 1 greater than the last bullet you new 'd. You... (by cire)
Data Storage Help
 
I am writing a program that will deal with several different files of different lengths but with the same format. I need to read through each line first to find...
[11 replies] Last: Thanks so much. I've got it working now, I appreciate the help. (by vckngs7)
by KinPom
unknown array size
 
Hello i have a problem to solve... I have to read an undefined sequence of numbers that terminates with the value -1 this has to be stored in an array(not a v...
[3 replies] Last: That looks more or less okay, however you need to allocate the origina... (by Athar)
dynamic array of constants
 
Hi all, I would like to define a dynamic array of constant objects - so the array size is not known at compile time. How am I able to acheive this ? Thank...
[5 replies] Last: Thank you ! That was really helpful. (by david188288)
File into Array
 
This is only a small portion of my code that I am having problems with. I do not seem to know how to do this properly, I've read other threads on this topic in ...
[2 replies] Last: Not sure what an iterator is the instructions are for me to use a para... (by Dee Hood)
What am I doing wrong? Involves Void Returning Functions
 
So I have to code a program that calculates the commission of various sales amounts and then displays the overall total commission, using one value returning fu...
[14 replies] Last: I got it! Thanks, you're awesome! (by tnguyen113)
Help a lab question
 
Trace the execution of the selection sort on the following list: 55 34 56 76 5 10 25 34 Show the array after each exchange occurs. How many comparisons ar...
[3 replies] Last: Selection sort means looking for the smallest item in the remaining li... (by Athar)
How to measure time difference in c++
 
I want to measure the time of a call duration but i dont know how to do it. Please help me. thanks.
[7 replies] Last: Oops, my bad. (by Duthomhas)
Help with array question
 
So I'm trying to write a loop that displays the characters in a string message in reverse order and then I need to write a function "scalarMultArray" that multi...
[4 replies] Last: alright thanks a lot (by cscstudent1991)
by Eyad
Linked List
 
Given a number x, write a program to delete all occurrences of x from a linked list in one iteration. That is, you can not scan the list more than once. I...
[8 replies] Last: i already submit it, thanks anyways, and sorry buddy if i offended you... (by Eyad)
string comparison
 
for what reasons strcpy is used in some cases where strings are to be compared...we can use strcmp for string comparison but why strcpy????
[1 reply] : strcpy is for copying c strings. It has nothing to do with comparison. (by Peter87)
Wrong virtual function called?
 
I have Object* which was new 'd to Enemy . When I call object->Interact(Window, player) code crashes. I did logging and it appears that wrong function is ...
[8 replies] Last: Aaah now I see where the problem was with my operator<. Thanks! (by closed account 10oTURfi)
Basic array questions
 
I was doing some school work and I got most of them, but am struggling with these two(still not super good at using arrays properly). question 1 int foo (voi...
[5 replies] Last: int foo (void) { int i,j,k; int a ; for(j=0;j<4;j++) { for(k=0... (by Algar32)
Program all around messed up. Tell me what I'm doing wrong?
 
This is an assignment for class. I have everything right up to the point where the total and savings (if any) part came up. I only want certain messages to come...
[5 replies] Last: Shinigami, do you mean I don't have to continue typing that out in ea... (by Shinigami)
How can we use gotoxy statement in dev C++?
 
How can we use gotoxy statement in dev C++?
[1 reply] : Pretty much the same as using it in MS Visual C++ Express, except you ... (by whitenite1)
8259 interrupts for Serial Com
 
Hi, I have been working on some basic low level communication through the number 1 port of a UART through C and now we have been asked to include interrupts in...
[no replies]
I want the following coddings
 
i need some coding of c++ or notepad for security of files. i mean to say that if i give some files to someone and when he open these files he has to enter a pa...
[3 replies] Last: If you don't want anyone to know about your data, don't give it away. (by Peter87)
April 2012 Pages: 1... 1819202122... 66
  Archived months: [mar2012] [may2012]

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