Beginners - October 2012 (Page 12)

Dynamic arrays
Hi all I want to create a multidimensional array where the user can can change it. First I need to know how to make a grid. Something like this: A b c d e...
Oct 27, 2012 at 7:48pm
[9 replies] Last: #include <algorithm> #include <cstddef> #include <iostream> #include ... (by Catfish2)
by BandK
String array
I have 2d string array named X . If i put in X text how to check that in X is text... example... if(in X is text){ }
Oct 27, 2012 at 7:36pm
[1 reply] : If(X =='text') .......... (by Joseph544310)
AVL tree taking horribly long time to insert
I have written a code to insert into avl and it takes over 15 minutes for my code to insert 1000000 random where as a sequential insert i.e 1 to 1000000 takes ...
Oct 27, 2012 at 6:45pm
[no replies]
Reading Different length of inputs from a file
Hi again. I have a input file shown below. the format of the file is first two data are string code,char status,then next three are char type,int reading1,read...
Oct 27, 2012 at 6:35pm
[2 replies] Last: Finally,got it in>>cust_code>>cust_status; while(in) { cout<... (by vichu8888)
function call
Can anyone please give me a better understanding of how the variables are pushed and poped from a stack during a function call and how the memory is dynamically...
Oct 27, 2012 at 6:33pm
[8 replies] Last: You are returning a pointer to a local variable - your compiler proba... (by guestgulkan)
Tic Tac Toe game scaling to connect 4
I am writing a tic tac toe game after seeing that a lot of people have done this and so took it upon myself to do the same. However after starting out I decided...
Oct 27, 2012 at 6:30pm
[1 reply] : Just seen the problem. I think (after playing a few games) that this i... (by martianxx)
median not showing up as a decimal
my median is never a decimal for some reason how can i fix it show it shows up as decimal at appropriate times. #include <iostream> using namespace std; ...
Oct 27, 2012 at 5:48pm
[6 replies] Last: Thanks got it working now. (by EternalTactician)
by enemy
ten signs line
Hallo! Please, what is wrong with that program: #include <iostream> using namespace std; int main() { int=a; for (int a=1; a<=10; a++) switch...
Oct 27, 2012 at 5:36pm
[4 replies] Last: It works!!!!Thank U!!! (by enemy)
what's problem?
Hi, what's problem of these three line? These Are Errors: error C2466: cannot allocate an array of constant size 0 IntelliSense: expression must have a con...
Oct 27, 2012 at 5:33pm
[3 replies] Last: new is how you allocate memory from the heap. (by Moschops)
by Dennou
Required Variables for Overloading Functions
Simply put, do you need to include variables of each data type that your overloaded function processes? Specifically, this is the program I'm working on. If...
Oct 27, 2012 at 5:12pm
[no replies]
by khal
struct Question
my table.h file private: static const int size = 9; struct test{ bool Info; test *next; }; test*array ; my table.cpp table::tab...
Oct 27, 2012 at 4:52pm
[1 reply] : When you have a pointer you have to first dereference the pointer (usi... (by Peter87)
reverse a number of digits of the user input
Hello, I want to make a program where the user has to input a few positive integers, like: 12345. Then I want to reverse that to: 54321. I have to use itoa...
Oct 27, 2012 at 4:26pm
[8 replies] Last: @LowestOne Am I on the right track? #include <stdio.h> #include <std... (by dutchman)
doubt in malloc
Is the following statement correct??? int *s = malloc(sizeof(int)100); I am asking this that till date i have encountered the declaration of malloc only as ...
Oct 27, 2012 at 4:11pm
[1 reply] : No. You need to use the multiplication operator int *s = malloc(sizeo... (by Peter87)
by segi
Formating text in .exe
Hello everyone. I`m still quite new in programming in C++ and I was woundering if anyone can help me with formating the output? When I run the .exe and have ...
Oct 27, 2012 at 4:07pm
[2 replies] Last: You could use a getline with ' ' as the delimiter. I think then it wil... (by IceThatJaw)
pointer declaration and initialization
If i write a statement as int *ptr=0; Does it mean that the address of ptr is zero??? Because we all are very well familiar that the code int i; int *pt...
Oct 27, 2012 at 4:02pm
[5 replies] Last: It means that the pointer has null pointer value.:) (by vlad from moscow)
up,down,left and right
Make a program that outputs a simple grid based gameboard to the screen using either numbers or characters. i.e. . . . . . . . . . . . G . . . . . . . ....
Oct 27, 2012 at 3:50pm
[2 replies] Last: Why don't you give the user a menu with North, South, East, and West c... (by IceThatJaw)
by khal
Error
Hi, I get this error when I try to compile my code. Unfortunately I can't post it since its a hw assignment. Could someone explain what it means? Thanks /t...
Oct 27, 2012 at 3:41pm
[3 replies] Last: You will want to include the .h in the corresponding .cpp file. For ... (by IceThatJaw)
Creating a package
Hey everybody, I have this assignment where I need to program something I guess like a package, so I would be able to include the header file and run the fun...
Oct 27, 2012 at 2:07pm
[15 replies] Last: Nevermind guys, as far as I can see it's a problem with my IDE <.< (by Guardian Angel)
Updating the original value
Hey guys, I have been stuck on this problem I have been getting on my small little project. #include <iostream> #define OP_1 "You have selected a Cola" ...
Oct 27, 2012 at 1:52pm
[6 replies] Last: Thank you ever so much! I have now fixed the problem. And I understand... (by dataoku)
Assigning to a 2d array with braces
I know for a 2d initialisation you can do this: int mda ={ {1,2,3},{4,5,6},{7,8,9} }; but how do I do this: int mda ; mda = { {1,2,3},{4,5,...
Oct 27, 2012 at 1:35pm
[3 replies] Last: @Guardian Angel Because I want to declare in one function and assign ... (by rozick1)
October 2012 Pages: 1... 1011121314... 84
  Archived months: [sep2012] [nov2012]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.