Beginners - January 2010 (Page 16)

by Wylbur
Char Strings in CLI Managed Heap
 
Hi all; Excuse me for being an idiot, but ... I am trying to initialize character arrays allocated from the managed heap (CLI), then access the ind...
[no replies]
double lacking precision
 
#include <iostream> int main() { double x = 123.456789; std::cout << x; return 0; } --- 123.457 Double is supposed to give me 15 decimal...
[2 replies] Last: Notice that due to floating point arithmetic imprecision, if you show ... (by Bazzy)
by MMag
Pointers to Structures and Objects
 
Hi all. So, I 80% comprehend what a pointer is all about. But, what is the use of pointers to structures or objects? When do these come in handy (when ...
[3 replies] Last: Additionally, if the pointer will always point to an object (ie is nev... (by moorecm)
by MMag
Pointer As An Argument for A String
 
Hello! Why do you pass a pointer through a function when you want to pass a string? Like this : void PrntStr(char *str) { std::cout << str << en...
[5 replies] Last: Thanks all guys, it's all comprehended now. Thanks for your efforts. (by MMag)
read a multidimensional dynamical array from txt file
 
Hi, this is my first post here and my second day programming in C++. My program should read a file with unknown number of rows and given number of columns i...
[1 reply] : You seem to have a misunderstanding of how multidimensional arrays wor... (by firedraco)
by Anton
Swapping contiguous layers in 3d array
 
Hi guys I'm really new to C++, so I don't quite get connection between arrays and pointers and how to use it in elegant way. Anyway, I have a 3d array, with fo...
[5 replies] Last: Obviously, if you're going to be making switches and not just copies,... (by IOwnTheWeb)
by nammae
Why doesn't destructor work?
 
// class Polynomial // Constructor, Destructor // Friend Function, Operator Overloading #include <iostream.h> class Polynomial { private: i...
[12 replies] Last: f = p + q; will work just fine, though it is probably less efficient ... (by jsmith)
by wolak
problem with array when trying to compile
 
I have been sitting at this for 2 hours now, and can't figure out what the heck the problem is. I believe the program is pretty much finished - the problem is ...
[1 reply] : void readdat(float& x, int& n); void minmax(float x, int& n, float... (by Sericet)
classes
 
Can someone remake this code to make program work not with char datatype,but int? CharStack.h typedef char elem ; class CharStack { private: ...
[7 replies] Last: Done. I could very well be wrong. :-) (by Duthomhas)
by Anton
Dynamic memory allocation
 
Hi all! I have a two-dimensional array of char strings (char ). The first dimension is known(number of strings - N), but the last one depends on the size of a...
[13 replies] Last: Because heap memory does not free itself. If you have variables on the... (by tummychow)
inline asm
 
Hello guys, I'm trying to insert some inline asm codes into a project but I have a doubt about it, for example: #include <iostream> using namespace st...
[3 replies] Last: i--; (by jsmith)
by August
connot fix errors
 
Id like it to compare the words... But i only get the word cat once and i need to get it twice... //The dic.txt cat rock ape lame cat #include <...
[1 reply] : Actually, I think you do get the word twice. It just happens to be di... (by moorecm)
by Aiyen
Difftime problem
 
Hello all I am currently writing a program where I need to know how long it takes for it to do a loop so that I might optimise it. For that purpose I have f...
[3 replies] Last: Okay embarrassing, the problem was because I had an array called tim... (by Aiyen)
Vector<string> trouble
 
I am tryng to display a random vector string. The vector object gets randomized, but the problem is that it only displays the FIRST letter of the string! Any id...
[4 replies] Last: SOLVED! I was using <cstring> instead of <string> in my headers, it wo... (by itzjonno)
Hungarian notation
 
For what are hungarian notation ? u know this example int iGamer for what are this i and then big word like Gamer example can someone say me plz in easy...
[13 replies] Last: i loled at this ;D Some used their code to publicize office mis... (by gcampton)
Program... question
 
hmmm i trying to make this Modify the program so that if the user scored a 90-100 it informs the user that they scored an A #include <iostream> using name...
[4 replies] Last: read http://cplusplus.com/forum/beginner/1988/ as to why you shouldn'... (by gcampton)
by freeze
PROBLEM REGARDING IF statements
 
I'm a first timer using if, else , or and and statements.cant make a problem 4 this one . if grade is 90 output must be A if grade is below 90 but higher t...
[16 replies] Last: oh god.. what a spoon feed.. (by blackcoder41)
Game Server files (1,2)
 
Hello all im new to c++ you dont know some good tutorials about how make server files i have mssql databaze done all but im missing just the server.exe log...
[24 replies] Last: Thank you Sericet. @firedraco, I hope so. (by chrisname)
how do i make this work?
 
how do i make it so this compound if statement only executes if ALL the statements in the () are equal? if ((space1 == "O"),(space2 == "O"),...
[1 reply] : take out the commas and use the logical OR ||, or the logical AND &... (by gcampton)
if else statement
 
i cant figure out why my program isn't working. if i take out the "else" statement, then it runs fine. my error message says "illegal syntax. no matching if sta...
[5 replies] Last: [quote=tummychow]NO BRACKETS BECAUSE THERE IS ONLY ONE LINE OF CODE ... (by R0mai)
January 2010 Pages: 1... 1415161718... 24
  Archived months: [dec2009] [feb2010]

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