Beginners - April 2012 (Page 6)

format specifier
 
a= sprintf(arr+k, "%#03d", x); in this statement what is the meaning of %#03d ??
[1 reply] : Format specifiers. See here http://www.cplusplus.com/reference/clibra... (by guestgulkan)
HELP CHAR
 
#include <iostream> using namespace std; int main() { char a = "aaaa" ; char pass ="aaaa"; cout << a << endl; if ( a==pass ) cout << "bye" << endl; ...
[4 replies] Last: ok i solved it : #include <iostream> #include <string> using namespac... (by Joseph544310)
If-else loop help
 
Hi, I am developing a program with the following criteria: Your program must accept as input the school the student is applying to (L or M), their high schoo...
[6 replies] Last: Thank you guys for all the advice and pointers. I have finished the pr... (by needhelp2345)
by sambos
Courious?
 
Hi. I'm new to programming and I've been self teaching myself for several months now and I have made several very simple programs already. I am courious abo...
[no replies]
Please help! error LNK2019: unresolved external symbol ?
 
Hey all, I am writing a code to play a game of Tic-Tac-Toe, and I keep getting one fatal error which prevents the code from compiling. Also, nothing I do see...
[2 replies] Last: Line 69: void postMove(int row, int clmn, char value) postMove s... (by shacktar)
the "this" keyword
 
CVector& CVector::operator= (const CVector& param) { x=param.x; y=param.y; return *this; } i was read about the " this " keyword i understood ...
[1 reply] : The operator is returning a reference to itself. This allows you to s... (by Disch)
What should I use?
 
I'm starting to programme using API's which one is the best for me? Direct3D or OpenGL?
[2 replies] Last: Probably DirectX for Windows and OpenGL for other platforms. (by unixhand)
cin buffer errors
 
this is not working i do not know why. here are the files. // // main.cpp // dealer2 // // Created by Home on 4/23/12. // Copyright (c) 2012 __MyCom...
[5 replies] Last: [code firstline=67] std::cin >> wager; //get std::cin.... (by cire)
Binary to ASCII. Improvements?
 
This is a program I made while learning about static type casting. The user must type in a binary byte such as 00011011 and the program will return the ASCII eq...
[2 replies] Last: //changed some formatting #include <iostream> #include <iomanip> usi... (by Mathhead200)
2D array vector(matricies) multiplication?
 
#include <iostream> #include <vector> using namespace std; void DisplayMatrix(vector <vector<double> > x) { for(int row = 0; row < x.size(); row++...
[no replies]
how do you turn your program into a .exe for cmd?
 
Hey guys, I don't remember if I said this before but the compiler I use is Microsofft's Visual C++ 2010 and I was wondering if you guys could tell me how to ...
[3 replies] Last: Thanks guys. (by science man)
What does 'void *addr=(long *)0xffff0008'...
 
the "(long *)" part do in this line? I understand that the value at address 0xffff0008 is what the void addr pointer is pointing at, but I don't understand the...
[2 replies] Last: I think in this case its a cast to a pointer to a long, i.e. it makes ... (by slicedpan)
Queens problem
 
Well... this is the N queens problem... I'm using 5 queens because it is small and I have couts showing me each step so I can see where I'm going wrong. I thoug...
[2 replies] Last: I added this function, but my queens are still stacking in the first c... (by eyesofhope)
while loop outputs extra line with eof file -help
 
Hello when i run this program it adds an extra line of text. how can i remove this line. i read in from a *.txt file using sstream library. Its around lines ...
[6 replies] Last: That was it. i had tried it when i read it from the link that was pos... (by matt566)
Conversion to template -> linker errors?
 
Hello! I have written a pretty simple program that takes a vector of class objects and performs a quicksort on them. I had the program working perfect before ...
[5 replies] Last: Hey guys! So I have attempted all of the above fixes and I am still g... (by calvarado777)
by I3lue
Need help why is it keep looping? :(
 
So this is my code but its not printing anything.... #include<iostream> using namespace std; int main() { ...
[2 replies] Last: ok now its keep looping.... const int SKIP=-999999; const int SIZE... (by I3lue)
by jaff
Using the Beta distribution in a specific way
 
Hi everyone, I needed to develop a C++ program, so I did the best I could (having no previous C++ experience). It required me to generate random numbers from...
[4 replies] Last: I just realised that there is a huge problem. Basically I need to gene... (by jaff)
by kready
Why are arrays so bad? advice please
 
The primary purpose of this lab is to implement a sorting algorithm on parallel arrays. There will be some sample code with the sort function left unimplemente...
[2 replies] Last: Your program crashes because you are traying to access memory outside ... (by vlad from moscow)
by NNinja
Can someone help with my code?
 
Hi there! C++ newbie here. I was working on a problem, but ran into some problems. We have to submit our assignments through this thing called hypergrade (not s...
[3 replies] Last: Thanks for replying! The calculated numbers are correct. So I'm still ... (by NNinja)
Working from the command line.
 
Hello, For several reasons, I'd like to start working from the command line rather than always having to go through the IDE. The MSDN articles were a tad sho...
[17 replies] Last: The *.cpp thing is not guaranteed to work on Windows, but IIRC the GCC... (by Duthomhas)
April 2012 Pages: 1... 45678... 66
  Archived months: [mar2012] [may2012]

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