Beginners - April 2011 (Page 27)

Wrong output for C++ code
 
I am a newbie to all of this, trying to learn on my own. This is revised code that others had helped me with. This code is STILL giving me some wrong output....
[1 reply] : You made another thread for the same problem, deleted the contents of ... (by hamsterman)
structs and data types
 
I am trying to control a quadrotor device, and to do so I need my program to send command inputs via a struct. In the owner's manual, it oultines how to do this...
[3 replies] Last: As long as chksum is 16-bits wide, then yeah, there won't be any diffe... (by Disch)
Hardships with compiling parrallel programs on serial machine
 
Hello, everyone. Sorry for disturbance. I am trying to compile Hello.world program for mpi using text from dummy mpi package mpi_stubs. Running g++ -c hello....
[1 reply] : Hello, just use the "mpicxx" command instead of "g++" to compile. (by stefanfuchs)
I don't understand these instructions! :(
 
The first step of my programming assignment, which is supposed to introduce us to arrays, is as follows: "Declare an array named tests and initialize 3 element...
[3 replies] Last: Okay. Thank you both very much for your help. I don't feel as clueless... (by neowoot)
by Tankid
Auto press enter in cin?
 
Hi guys I saw a program that asks the user to input y or n to continue the process... and when you input one of them it automatically presses enter and proce...
[7 replies] Last: If you want an option after another option, try using a switch stateme... (by Lynx876)
Using pointers to compare multiple values?
 
Hi all, I'm constructing a Battleships game, and I have a "srand" function for assigning random values to the computer's ships. Because I'm working in small ...
[2 replies] Last: thank you sasanet, that seems to have worked :) much appreciated (by Jonnyisonfire)
by Donny
Reversing Values - Few Problems
 
Hi guys, I'm still pretty much a beginner on c++. Basically, i've got a random number generator and it gives me pressure values, which are written to a file nam...
[2 replies] Last: You already included the <vector> why not use it? IMO it's easier to s... (by matsom)
Limiting the jump
 
Hi, I am still writing on my game. But I habe come to a problem where I don't know right now how to solve it. Basically it is a platform game. Everything wor...
[14 replies] Last: No problem, glad you solved it :) (by Acr)
Help with map class and base class pointers
 
can anyone explain why I need to put record* in the map section? Also is this the best way of storing the base class pointers within the map? As I intend to cre...
[8 replies] Last: ah yes, I was being very stupid. I shouldn't of been doing cout<< ....... (by ashsmash90)
by celem
Filestream headaches
 
I've been knocking my head off this problem for a couple of days now. Have been trawling through the c++ references here and googling my way round a series of ...
[4 replies] Last: I took the above code snippet and created a new project using my trust... (by celem)
Finding prime numbers loop
 
i have this hw question where i have to find all prime numbers between 1-1000 using boolean i.e. bool primeNum (long num); and then displays it and sums up al...
[3 replies] Last: this is no prime number program..... first read and see what a prime ... (by tejashs)
Inheritance complications
 
Hi! I'm currently having a quite ugly problem with some classes. To describe the issue, I'd say that: I have a parent class ("parent"), which contains a struc...
[7 replies] Last: I've made it! With just one templated class. As template parameter, I'... (by Ramses12)
Converting from java code to c++
 
I'm not sure if anyone knows how to code in java. But I wanted to write a c++ version of this SortedLinkList class. I just don't know how to point values to ...
[1 reply] : Extend Node like so: struct Node { Node *next; int data; bool c... (by coder777)
by v41r
Battleship game (random placement of ships)
 
I'm making a Battleship program for a school assignment (there, I said it). Everything is coming along rather good, except for the placing of the ships. They ar...
[2 replies] Last: The reason why you don't get an answer is: your question is not specif... (by coder777)
Calling a function from a class
 
Hey there, I am trying to learn how to us functions in seperate files but i fail each time i try. I have some problems with Calling (a) function(s) from a c...
[4 replies] Last: Thank you both for the quick response =] This will help me very much, ... (by neckronis)
by SephX
Changing array value
 
Hello, I am having a little trouble on thinking how to do this. The program that I'm working on is a little more than this, but the concept is the same. I hav...
[9 replies] Last: Mmm, a board holding int is ok as long as you're clear what the int re... (by kbw)
Linked list of integers.
 
I know that we shouldn't post homework problems but this problem is the only homework question i need to do to get an A in my C++ class Please help me out. W...
[3 replies] Last: No worries coder777. I won't be handing out a solution here. This was ... (by closed account D80DSL3A)
sorting a vector of classes containing strings
 
The title says it all. Like in this example: #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { ...
[1 reply] : if you want to sort complex data like that 'Stuff' use the operator<(... (by coder777)
Beginning QT
 
What, according to those of you experienced in QT, would be the best way to begin learning QT?..Hand Coding or using the designer for everything ?..Also How muc...
[6 replies] Last: I am just starting out with Qt myself. Using the form + widgets in Qt ... (by dangrr888)
comparring arrays
 
ok i have another noob question i have a program that asks for an account number cout << "Enter one Account number(Between 1000 and 9999) at a time: " << en...
[6 replies] Last: Hi, I've not really had time to check through the code, but having ski... (by lnk2019)
April 2011 Pages: 1... 2526272829... 55
  Archived months: [mar2011] [may2011]

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