Beginners - April 2012 (Page 63)

help with this code
 
please anyone help me with this questions The following code is supposed to display the positive even numbers less than 12. That is, it will output the number...
[1 reply] : OK, first thing, follow your code: You start with x = 1, and then you... (by TheDestroyer)
Vector addition
 
high i have a vector class with 1 default and 2 overloaded constructors that look like: Vect :: Vect() { mode='r'; x=0.0; y=0.0; mag...
[2 replies] Last: Thank you : ) problem solved (by patchesOhulihan)
trouble with pointers
 
I am trying to use certain variables accross multiple functions so I have used pointers and it works accross the majority of my code but when I get to the funct...
[11 replies] Last: [quote=jax666999 ]error C2065: 'pref' : undeclared identifier Does the... (by closed account 1vRz3TCk)
pointer fun
 
I'm trying to learn pointers... I have a bizarre little program. First, I need to know why you don't need to dereference arrays. Second, Why is the last bit...
[2 replies] Last: Thanks. Very interesting. An array being a pointer but its index deref... (by wizoverloadfroze)
by pzling
LNK2001: unresolved external symbol
 
Hi Could someone kindly explain the nature behind a LNK2001 error? I'm using source files I've previously written in a new project but upon compile I ge...
[2 replies] Last: Thanks So in RandomBase I have: class RandomBase { // ... // protec... (by pzling)
by swany4
need help writing a program
 
Can someone write me this program Overview In this assignment, you will analyze three types of household utility expenses (gas, electricity and water) ove...
[3 replies] Last: write the program to the best of your knowledge run it and if it doesn... (by jax666999)
Wrong template syntax or gcc is buggy?
 
In line 23, I get a: internal compiler error: tree check: expected tree that contains 'decl minimal' structure, have 'nop_expr' in decl_linkage, at cp/tree.c:...
[8 replies] Last: > But why leads to undefined behavior? > what is the difference (in CP... (by JLBorges)
Convert into hex
 
Hello, I want to get content of a file and store it in a string(?), but also convert that string into hex number. I do it via this code, I'm only getting 6 h...
[3 replies] Last: I did this: cout << setw(8) << setfill('0') << hex << i << endl Bu... (by force123)
Highscores on a webpage?
 
Hi, I'm writing a game that you just leave open and every 5 minutes your score will increase, how can I make it so when someone quits the application, their hig...
[4 replies] Last: Look into NodeJS ... that should help ... a good site for that should... (by TwoOfDiamonds)
Change value in 2D array
 
Hello, I am having trouble doing two things to my array. 1) change the values of column 2. multiply by 2 2) change the value of row 7, col 6 to value 10....
[2 replies] Last: Thank you very much for the assistance! I kept trying different ways t... (by HPexpress)
by atkfo
Hello.
 
Hello, is it okay if any of you can explain to me these codes? Im using microcontroller C8051f226 and i know this has something to do with the datasheet. ...
[2 replies] Last: Yep, I've tried reading the datasheet. i know this line "T2CON = 0x08... (by atkfo)
Class menu
 
Is it possible to make a menu program by using class? This was my original code(below) but I want to use class to modify the program. #include <iostream> ...
[3 replies] Last: if done correctly, you wouldn't need a switch / case you would pass t... (by oonej)
Search Keyword in String in C++
 
Hi I am a novice in the world of programming and now want yours help . Suppose I have a string in c++ . string s("I am a student.I am a student.I...
[1 reply] : http://www.cplusplus.com/reference/string/string/ (by Shinigami)
Issue with descending order sort using pointers
 
#include <iostream> #include <iomanip> using namespace std; void showDrr( double* drr, int size ) { for( int i = 0; i < size; ++i ) c...
[2 replies] Last: Descending order and that is where i am having the current trouble (by clamscasino)
Self Destruct Program
 
Hey guys, I was wondering if it is possible to create an application that deletes its own .cpp file. I googled this but i couldnt understand most of what came...
[4 replies] Last: Only one way to find out. Go test your theory lol. (by Factors)
by neato
sorting array cant get program to run HELP
 
#include <iostream> using std::cout; using std::endl; #include <cstdlib> using std::rand; using std::srand; #include <ctime> using std::time; /...
[2 replies] Last: You can't declare a variable like: inti=0; The compiler doesn't know... (by Thrax)
assigning ASCII values as const char
 
I'm trying to write a roguelike using SDL and C++. However, I'm running into a snag. I have a header that has all of my initializing stuff like screen attribute...
[2 replies] Last: Derp, figured it was something stupid like that. Works fine now, thank... (by bhazothemad)
Array size without specifying?
 
I am doing a program that requires me to process employees pay. Once the process is ended, the arrays are passed into a function and they are looped and printed...
[1 reply] : Try out a vector. It's basically a dynamic array (which is what it se... (by Thrax)
How to print \n?
 
Quick newbie question. How do I print "\n" ? I'm writing a program that requires \n to come up on the console ... how do I do it so that it does not go to a...
[3 replies] Last: Ty! Cj , yeah... I found out the answer before I checked this thread a... (by TheJabre)
"cannot convert from type void to int"
 
I am trying to write this program with two functions but I keep getting the compiling error "cannot convert parameter 2 from 'void' to 'int'. I do know what thi...
[2 replies] Last: Also, as a bit of advice: Do not include "return;" in void functions... (by Thrax)
April 2012 Pages: 1... 616263646566
  Archived months: [mar2012] [may2012]

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